Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at host.c:530

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2544.2575
Procedure: ht_insert
Trace: View
Modified: Wed Sep 2 12:40:50 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
   /u1/paul/SATE/2010/c/pvm/pvm3/src/ddpro.c
   Enter ht_diff
 1850 struct htab * 
 1851 ht_diff(htp2, htp1) 
 1852         struct htab *htp2;              /* more */ 
 1853         struct htab *htp1;              /* less */ 
 1854 {
 1855         struct htab *htp;
 1856         int hh;
 1857  
true1858         htp = ht_new(1);   /* Leak (ID: 2543.2574) */
 1859         for (hh = htp2->ht_last; hh > 0; hh--)
 1860                 if (htp2->ht_hosts[hh] && !htp2->ht_hosts[hh]->hd_err 
 1861                 && (hh > htp1->ht_last || !htp1->ht_hosts[hh]))
htp->ht_last < 5111862                         ht_insert(htp, htp2->ht_hosts[hh]);
     /u1/paul/SATE/2010/c/pvm/pvm3/src/host.c
     Enter ht_diff / ht_insert
((char*)$param_1)[4] < 511507   ht_insert(htp, hp) 
 508           struct htab *htp;
 509           struct hostd *hp;
 510   {
 511           int hh;
 512           int i;
 513           unsigned long mask = 0, tmpmask;
 514    
 515           int *dsigs;
 516           int ndsigs;
 517           int found;
 518           int d;
 519    
 520           hh = (hp->hd_hostpart & tidhmask) >> (ffs(tidhmask) - 1);
 521    
 522           /* extend ht_hosts[] if no room */ 
 523    
 524           if (hh > htp->ht_last) {
htp->ht_last < 511525                   int n = htp->ht_last;
 526    
 527                   htp->ht_last = (hh * 3) / 2;
n < 511528                   htp->ht_hosts = TREALLOC(htp->ht_hosts, htp->ht_last + 1, struct hostd*);
 529                   while (++n <= htp->ht_last)
htp->ht_hosts <= 4095530                           htp->ht_hosts[n] = 0;     /* Null Pointer Dereference */  /* 6 more... */
     Exit ht_diff / ht_insert
Preconditions
&$unknown_477607 >= 2
&$unknown_477608 >= 2
((char*)$param_1)[4] >= 1
((char*)$param_2)[4] >= ((char*)$param_1)[4]
((char*)$param_2)[4] >= 1
Postconditions
$heap_31911' = 0
bytes_after(&$heap_31911)' = 40
$heap_31911' is allocated by malloc
$heap_31911' is allocated
bytes_before(&$heap_31911)' = 0
strlen(&$heap_31911)' = 0
((char*)&$heap_31911)[32]' = 0
((char*)&$heap_31911)[4]' = &$unknown_477608
$heap_31912' = 0
bytes_after(&$heap_31912)' = 16
$heap_31912' is allocated by malloc
$heap_31912' is allocated
bytes_before(&$heap_31912)' = 0
strlen(&$heap_31912)' = 0
hh' = &$unknown_477607
hh' = ((char*)$param_1)[4]
hp' = &$unknown_477606
htp' = &$heap_31911
htp' = &$heap_31911
htp1' = $param_2
htp2' = $param_1
mask' = 0
n' = 2




Change Warning 2544.2575 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: