Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Integer Overflow of Allocation Size  at trcutil.c:1602

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 427.29173
Procedure: trc_make_value
Trace: view
Modified: Thu Nov 26 11:35:35 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/trcutil.c
   Enter trc_make_value
 1574 trc_make_value( dt, num ) 
 1575 int dt;
 1576 int num;
 1577 {
 1578         TRC_VALUE tmp;
 1579  
 1580         int i;
 1581  
 1582         if ( num < 1 )
 1583                 return( (TRC_VALUE) NULL );
 1584  
 1585         tmp = (TRC_VALUE) NULL;
 1586  
 1587         switch ( dt ) 
 1588         {
 1589                 case TEV_DATA_NULL: break;
 1590  
 1591                 case TEV_DATA_BYTE: 
 1592                 {
 1593                         tmp = (TRC_VALUE) malloc( (unsigned) num * sizeof( char ) );
 1594                         trc_memcheck( tmp, "Character Data Pointer" );
 1595  
 1596                         break;
 1597                 }
 1598  
 1599                 case TEV_DATA_STRING: 
 1600                 {
 1601                         tmp = (TRC_VALUE) malloc( (unsigned) num 
true1602                                 * sizeof( char * ) );     /* Integer Overflow of Allocation Size */
Preconditions
dt = 12
num >= 1
$input_12 = 0
Postconditions
tmp' = 0




Change Warning 427.29173 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: