Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2468.2496
Procedure: ht_new
Trace: View
Modified: Wed Sep 2 12:39:43 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/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: 2469.2497) */
 493         htp->ht_last = siz;
true494         htp->ht_hosts = TALLOC(siz + 1, struct hostd*, "ht2");
htp->ht_hosts <= 4095495         BZERO((char*)htp->ht_hosts, (siz + 1) * sizeof(struct hostd*));     /* Null Pointer Dereference */
Preconditions
$param_1 <= 0
Postconditions
$heap_2785' = 0
bytes_after(&$heap_2785)' = 40
$heap_2785' is allocated by malloc
$heap_2785' is allocated
bytes_before(&$heap_2785)' = 0
strlen(&$heap_2785)' = 0
((char*)&$heap_2785)[32]' = 0
((char*)&$heap_2785)[4]' = 1
htp' = &$heap_2785
siz' = 1




Change Warning 2468.2496 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: