#2387 closed Bug (fixed)

use uninitialized variable in sbcblk

Reported by: smasson Owned by: systeam
Priority: high Milestone:
Component: SBC Version: trunk
Severity: minor Keywords:
Cc: Branch review: failed
MP ready?: no Task progress: Unspecified

Description

Context

Following the merge of 2019 developments, we use sf(jfpr)%clrootname before its initialization in sbcblk

Analysis

line 263 in sbcblk, we test sf(jfpr)%clrootname :

         IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN    !--  not used field  --!   (only now allocated and set to zero)

but this variable is initialized by the call to fld_fill line 283

Fix

Move the call to fld_fill before using sf(jfpr)%clrootname: line 260
In addition, once this call is done, it is better to avoid to use slf_i as this structure is created only to fill sf. So we will use sf instead of slf_i lines: 271, 274, 277

Commit History (1)

ChangesetAuthorTimeChangeLog
12459smasson2020-02-25T17:14:19+01:00

trunk: fix uninitialized variable in sbcblk, see #2387

Change History (2)

comment:1 Changed 11 months ago by smasson

In 12459:

trunk: fix uninitialized variable in sbcblk, see #2387

comment:2 Changed 11 months ago by smasson

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [12459]

Note: See TracTickets for help on using tickets.