Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 53.28638
Procedure: applydefaults
Trace: view
Modified: Thu Nov 26 11:27:11 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 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->);   /* Null Pointer Dereference (ID: 22027.28644) */
 689  
 690         if (!hp->hd_dpath && defhp->hd_dpath)
 691                 hp->hd_dpath = STRALLOC(defhp->hd_dpath);   /* Null Pointer Dereference (ID: 58.28643) */
 692  
 693         if (!hp->hd_epath && defhp->hd_epath)
 694                 hp->hd_epath = STRALLOC(defhp->hd_epath);   /* Null Pointer Dereference (ID: 57.28642) */
 695  
 696         if (!hp->hd_bpath && defhp->hd_bpath)
 697                 hp->hd_bpath = STRALLOC(defhp->hd_bpath);   /* Null Pointer Dereference (ID: 56.28641) */
 698  
 699         if (!hp->hd_wdir && defhp->hd_wdir)
 700                 hp->hd_wdir = STRALLOC(defhp->hd_wdir);   /* Null Pointer Dereference (ID: 55.28640) */
 701  
 702         if (!hp->hd_sopts && defhp->hd_sopts)
 703                 hp->hd_sopts = STRALLOC(defhp->hd_sopts);   /* Null Pointer Dereference (ID: 54.28639) */
 704  
 705         if (!hp->hd_aname && defhp->hd_aname)
true706                 hp->hd_aname = STRALLOC(defhp->hd_aname);     /* Null Pointer Dereference */
Preconditions
hp->hd_login = 0
hp->hd_dpath = 0
hp->hd_epath = 0
hp->hd_bpath = 0
hp->hd_wdir = 0
hp->hd_sopts = 0
hp->hd_aname = 0
defhp->hd_login = 0
defhp->hd_epath = 0
Postconditions
errno' != 0
$heap_1437' = *defhp->hd_dpath
bytes_after(&$heap_1437)' = strlen(defhp->hd_dpath) + 1
$heap_1437' is allocated by malloc
$heap_1437' is allocated
bytes_before(&$heap_1437)' = 0
strlen(&$heap_1437)' = strlen(defhp->hd_dpath)
tocttou($heap_1437)' = tocttou(*defhp->hd_dpath)
$heap_1438' = *defhp->hd_bpath
bytes_after(&$heap_1438)' = strlen(defhp->hd_bpath) + 1
$heap_1438' is allocated by malloc
$heap_1438' is allocated
bytes_before(&$heap_1438)' = 0
strlen(&$heap_1438)' = strlen(defhp->hd_bpath)
tocttou($heap_1438)' = tocttou(*defhp->hd_bpath)
$heap_1439' = *defhp->hd_wdir
bytes_after(&$heap_1439)' = strlen(defhp->hd_wdir) + 1
$heap_1439' is allocated by malloc
$heap_1439' is allocated
bytes_before(&$heap_1439)' = 0
strlen(&$heap_1439)' = strlen(defhp->hd_wdir)
tocttou($heap_1439)' = tocttou(*defhp->hd_wdir)
$heap_1440' = *defhp->hd_sopts
bytes_after(&$heap_1440)' = strlen(defhp->hd_sopts) + 1
$heap_1440' is allocated by malloc
$heap_1440' is allocated
bytes_before(&$heap_1440)' = 0
strlen(&$heap_1440)' = strlen(defhp->hd_sopts)
tocttou($heap_1440)' = tocttou(*defhp->hd_sopts)




Change Warning 53.28638 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: