Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at trccompat.c:636

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2845.2906
Procedure: trc_dump_old_pvm_event_fmt
Trace: View
Modified: Wed Sep 2 12:49:47 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /u1/paul/SATE/2010/c/pvm/pvm3/tracer/trccompat.c
   Enter trc_dump_old_pvm_event_fmt
true570 trc_dump_old_pvm_event_fmt( ID, eid ) 
 571 TRC_ID ID;
 572 int eid;
 573 {
 574         char buf[4096];
 575  
 576         char *fmt;
 577  
 578         int keeplist[10];
 579  
 580         int veclen;
 581         int index;
 582         int nkeep;
 583         int keep;
 584         int ival;
 585  
 586         fmt = trc_old_tev_formats[ eid ].fmt;
 587  
 588         if ( fmt != NULL )
 589         {
 590                 nkeep = 0;
 591  
 592                 while ( *fmt )
 593                 {
 594                         if ( *fmt == '%' )
 595                         {
 596                                 fmt++;
 597  
 598                                 if ( *fmt == '*' )
 599                                 {
 600                                         keep = TRC_TRUE;
 601  
 602                                         fmt++;
 603                                 }
 604  
 605                                 else 
 606                                         keep = TRC_FALSE;
 607  
 608                                 if ( *fmt == '$' )
 609                                 {
 610                                         fmt++;
 611  
 612                                         index = *fmt - '0';
 613  
 614                                         fmt++;
 615  
 616                                         veclen = ( index >= 0 && index < nkeep ) 
 617                                                 ? keeplist[index] : 0;
 618                                 }
 619  
 620                                 else 
 621                                         veclen = 1;
 622  
 623                                 while ( veclen > 0 )
 624                                 {
 625                                         veclen--;
 626  
 627                                         switch ( *fmt ) 
 628                                         {
 629                                                 case 'R': 
 630                                                 case 'd': 
 631                                                 case 'r': 
 632                                                 case 'x': 
 633                                                 {
 634                                                         pvm_upkint( &ival, 1, 1 );
 635                  
ival is uninitialized636                                                         fprintfID->trace_out, ", %d", ival );     /* Uninitialized Variable */
Preconditions
((char*)&((char*)$unknown_2559164)[72])[40] = 1
$unknown_2559137 = 37
strlen(&$unknown_2559137) != 0
strlen(&$unknown_2559137) != 1
((char*)&$unknown_2559137)[1] = 100
myfmt = -1
pvmautoerr = 0
pvmmytid = -1
pvmtoplvl != 0
Postconditions
((char*)&((char*)$unknown_2559164)[72])[40]' = ((char*)&((char*)$unknown_2559164)[72])[40] - 1
((char*)$unknown_2559164)[72]' = &freefrags.fr_link
ID' = $param_1
eid' = $param_2
fmt' = &$unknown_2559137 + 1
freefrags.fr_rlink' = ((char*)&$unknown_2559164)[72]
keep' = 0
nkeep' = 0
pvm_errno' = -15
pvmmytid' != -1
pvmrbuf' = 0
pvmtrc.trctid' <= 0
topvmd' = 0
veclen' = 0




Change Warning 2845.2906 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: