Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at host.c:495

Categories: LANG.MEM.NPD CWE:476
Warning ID: 59.28645
Procedure: ht_new
Trace: view
Modified: Thu Nov 26 11:27:13 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_new
 483 struct htab * 
 484 ht_new(siz) 
 485         int siz;                /* initial length of ht_hosts[] */ 
 486 {
 487         struct htab *htp;
 488  
 489         if (siz < 1)
 490                 siz = 1;
 491         htp = TALLOC(1, struct htab, "ht1");
 492         BZERO((char*)htp, sizeof(struct htab));   /* Null Pointer Dereference (ID: 61.28647) */
 493         htp->ht_last = siz;
true494         htp->ht_hosts = TALLOC(siz + 1, struct hostd*, "ht2");   /* Integer Overflow of Allocation Size (ID: 60.28646) */
htp->ht_hosts <= 4095495         BZERO((char*)htp->ht_hosts, (siz + 1) * sizeof(struct hostd*));     /* Null Pointer Dereference */
Preconditions
siz <= 0
Postconditions
errno' != 0
$heap_2014' = 0
bytes_after(&$heap_2014)' = 32
$heap_2014' is allocated by malloc
$heap_2014' is allocated
bytes_before(&$heap_2014)' = 0
((char*)&$heap_2014)[28]' = 0
((char*)&$heap_2014)[4]' = 1
htp' = &$heap_2014
siz' = 1




Change Warning 59.28645 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: