Text  |   XML   |   Visible Warnings:

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

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 437.29186
Procedure: trc_check_listsize
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_check_listsize
 413 trc_check_listsize( list, size, index ) 
 414 void ***list;
 415 int *size;
 416 int index;
 417 {
 418         void **newlist;
 419  
 420         int newsize;
 421         int i;
 422  
 423         if ( index >= *size )
 424         {
 425                 newsize = 2 * index;
 426  
 427                 newsize = newsize ? newsize : 100;
 428  
 429                 newlist = (void **) malloc( (unsigned) newsize 
true430                         * sizeof(void *) );     /* Integer Overflow of Allocation Size */
Preconditions
&$unknown_11724307 != 0
&$unknown_11724307 = 2 * index
&$unknown_11724307 >= 2 * *size
$input_12 = 0
Postconditions
newsize' = &$unknown_11724307




Change Warning 437.29186 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: