Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Integer Overflow of Allocation Size  at trcfile.c:139

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 435.29184
Procedure: trc_add_tevdesc
Trace: view
Modified: Thu Nov 26 11:35:40 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/trcfile.c
   Enter trc_add_tevdesc
 114 trc_add_tevdesc( ID, TDptr, tid, omit ) 
 115 TRC_ID ID;
 116 TRC_TEVDESC *TDptr;
 117 int tid;
 118 int omit;
 119 {
 120         TRC_TEVDESC *newlist;
 121  
 122         TRC_TEVDESC tdptr;
 123         TRC_TEVDESC last;
 124  
 125         int newsize;
 126         int index;
 127         int eid;
 128         int i;
 129  
 130         /* Verify Descriptor List is Large Enough */ 
 131  
 132         eid = (*TDptr)->eid;
 133  
 134         if ( eid >= TRC_TEVDESC_SIZE )
 135         {
 136                 newsize = 2 * ( eid + 1 );
 137  
 138                 newlist = (TRC_TEVDESC *) malloc( (unsigned) newsize 
true139                         * sizeof( TRC_TEVDESC ) );     /* Integer Overflow of Allocation Size */
Preconditions
(*TDptr)->eid >= TRC_TEVDESC_SIZE
$input_12 = 0
Postconditions
eid' = (*TDptr)->eid
newsize' = 2 * (*TDptr)->eid + 2




Change Warning 435.29184 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: