Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at trcfile.c:2407

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 420.29143
Procedure: trc_dump_trace_str
Trace: view
Modified: Thu Nov 26 11:35:07 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
   /kat0/fletcher/SATE/2010/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                  
 636                                                         fprintf( ID->trace_out, ", %d", ival );   /* Uninitialized Variable (ID: 421.29144) */
 637                  
 638                                                         break;
 639                                                 }
 640                  
 641                                                 case 'S': 
 642                                                 {
 643                                                         pvm_upkstr( buf );
 644                  
buf is uninitialized645                                                         trc_dump_trace_str( ID, buf, TRC_TRUE );
     /kat0/fletcher/SATE/2010/pvm3/tracer/trcfile.c
     Enter trc_dump_old_pvm_event_fmt / trc_dump_trace_str
 2399   trc_dump_trace_str( ID, str, comma_flag ) 
 2400   TRC_ID ID;
 2401   char *str;
 2402   int comma_flag;
 2403   {
 2404           if ( comma_flag )
 2405           {
 2406                   fprintf( ID->trace_out, ", [%u] { \"%s\" }",
*str is uninitialized2407                           (unsigned) ( strlen( str ) + 1 ), str );     /* Uninitialized Variable */  /* 3 more... */
     Exit trc_dump_old_pvm_event_fmt / trc_dump_trace_str
Preconditions
$unknown_11430593 = 37
strlen(&$unknown_11430593) != 0
strlen(&$unknown_11430593) != 1
((char*)&$unknown_11430593)[1] = 83
pvmrbuf != 0
pvmtoplvl = 0
Postconditions
ID' = ID
comma_flag' = 1
fmt' = &$unknown_11430593 + 1
keep' = 0
nkeep' = 0
str' = &buf[0]
veclen' = 0




Change Warning 420.29143 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: