Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Integer Overflow of Allocation Size  at host.c:619

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 34.28617
Procedure: ht_delete
Trace: view
Modified: Thu Nov 26 11:27:05 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/src/host.c
   Enter ht_delete
 593 ht_delete(htp, hp) 
 594         struct htab *htp;
 595         struct hostd *hp;
 596 {
 597         int hh;
 598         int i;
 599         unsigned long mask = 0, tmpmask;
 600  
 601         int *dsigs;
 602         int ndsigs;
 603         int found;
 604         int d;
 605  
 606         hh = (hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1);
 607         if (hh < 0 || hh > htp->ht_last || htp->ht_hosts[hh] != hp) {
 608                 pvmlogerror("ht_delete() host not in table\n");
 609                 return;
 610         }
 611         htp->ht_hosts[hh] = 0;
 612         if (hh)
 613                 htp->ht_cnt--;
 614  
 615         hd_unref(hp);
 616  
 617         /* update number of arches */ 
 618  
true619         dsigs = TALLOC( htp->ht_cnt, int, "dsigs");     /* Integer Overflow of Allocation Size */
Preconditions
&$unknown_3752 <= htp->ht_last
&$unknown_3752 >= 1
htp->ht_last >= 1
hp->hd_dpath != 0
hp->hd_txq >= 0
hp->hd_opq >= 0
hp->hd_rxq >= 0
hp->hd_rxm >= 0
hp->hd_mcas >= 0
hp->hd_ref <= 1
$input_12 = 0
Postconditions
hh' = &$unknown_3752
mask' = 0




Change Warning 34.28617 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: