Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2466.2494
Procedure: applydefaults
Trace: View
Modified: Wed Sep 2 12:39:42 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 applydefaults
 683 applydefaults(hp, defhp) 
 684         struct hostd *hp;               /* hostd to modify */ 
 685         struct hostd *defhp;    /* default settings */ 
 686 {
 687         if (!hp-> && defhp->)
 688                 hp-> = STRALLOC(defhp->);
 689  
 690         if (!hp->hd_dpath && defhp->hd_dpath)
 691                 hp->hd_dpath = STRALLOC(defhp->hd_dpath);   /* Null Pointer Dereference (ID: 2467.2495) */
 692  
 693         if (!hp->hd_epath && defhp->hd_epath)
true694                 hp->hd_epath = STRALLOC(defhp->hd_epath);     /* Null Pointer Dereference */
Preconditions
((char*)$param_1)[24] = 0
((char*)$param_1)[32] = 0
((char*)$param_1)[40] = 0
((char*)$param_2)[40] != 0
Postconditions
defhp' = $param_2
$heap_2720' = ((char*)*$param_2)[24]
bytes_after(&$heap_2720)' = strlen(((char*)$param_2)[24]) + 1
$heap_2720' is allocated by malloc
$heap_2720' is allocated
bytes_before(&$heap_2720)' = 0
strlen(&$heap_2720)' = strlen(((char*)$param_2)[24])
$heap_2721' = ((char*)*$param_2)[32]
bytes_after(&$heap_2721)' = strlen(((char*)$param_2)[32]) + 1
$heap_2721' is allocated by malloc
$heap_2721' is allocated
bytes_before(&$heap_2721)' = 0
strlen(&$heap_2721)' = strlen(((char*)$param_2)[32])
hp' = $param_1




Change Warning 2466.2494 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: