Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2461.2489
Procedure: applydefaults
Trace: View
Modified: Wed Sep 2 12:39:40 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)
 694                 hp->hd_epath = STRALLOC(defhp->hd_epath);   /* Null Pointer Dereference (ID: 2466.2494) */
 695  
 696         if (!hp->hd_bpath && defhp->hd_bpath)
 697                 hp->hd_bpath = STRALLOC(defhp->hd_bpath);   /* Null Pointer Dereference (ID: 2465.2493) */
 698  
 699         if (!hp->hd_wdir && defhp->hd_wdir)
 700                 hp->hd_wdir = STRALLOC(defhp->hd_wdir);   /* Null Pointer Dereference (ID: 2464.2492) */
 701  
 702         if (!hp->hd_sopts && defhp->hd_sopts)
 703                 hp->hd_sopts = STRALLOC(defhp->hd_sopts);   /* Null Pointer Dereference (ID: 2463.2491) */
 704  
 705         if (!hp->hd_aname && defhp->hd_aname)
 706                 hp->hd_aname = STRALLOC(defhp->hd_aname);   /* Null Pointer Dereference (ID: 2462.2490) */
 707  
 708         if (!(hp->hd_flag & HF_SPEED) && (defhp->hd_flag & HF_SPEED))
 709                 hp->hd_speed = defhp->hd_speed;
 710  
 711         if (!hp->hd_vmid && defhp->hd_vmid)
true712                 hp->hd_vmid = STRALLOC(defhp->hd_vmid);     /* Null Pointer Dereference */
Preconditions
((char*)$param_1)[184] = 0
((char*)$param_1)[192] = 0
((char*)$param_1)[24] = 0
((char*)$param_1)[32] = 0
((char*)$param_1)[40] = 0
((char*)$param_1)[48] = 0
((char*)$param_1)[56] = 0
((char*)$param_1)[64] = 0
((char*)$param_2)[192] != 0
((char*)$param_2)[40] = 0
Postconditions
defhp' = $param_2
$heap_1165' = ((char*)*$param_2)[24]
bytes_after(&$heap_1165)' = strlen(((char*)$param_2)[24]) + 1
$heap_1165' is allocated by malloc
$heap_1165' is allocated
bytes_before(&$heap_1165)' = 0
strlen(&$heap_1165)' = strlen(((char*)$param_2)[24])
$heap_1166' = ((char*)*$param_2)[32]
bytes_after(&$heap_1166)' = strlen(((char*)$param_2)[32]) + 1
$heap_1166' is allocated by malloc
$heap_1166' is allocated
bytes_before(&$heap_1166)' = 0
strlen(&$heap_1166)' = strlen(((char*)$param_2)[32])
$heap_1167' = ((char*)*$param_2)[48]
bytes_after(&$heap_1167)' = strlen(((char*)$param_2)[48]) + 1
$heap_1167' is allocated by malloc
$heap_1167' is allocated
bytes_before(&$heap_1167)' = 0
strlen(&$heap_1167)' = strlen(((char*)$param_2)[48])
$heap_1168' = ((char*)*$param_2)[56]
bytes_after(&$heap_1168)' = strlen(((char*)$param_2)[56]) + 1
$heap_1168' is allocated by malloc
$heap_1168' is allocated
bytes_before(&$heap_1168)' = 0
strlen(&$heap_1168)' = strlen(((char*)$param_2)[56])
$heap_1169' = ((char*)*$param_2)[64]
bytes_after(&$heap_1169)' = strlen(((char*)$param_2)[64]) + 1
$heap_1169' is allocated by malloc
$heap_1169' is allocated
bytes_before(&$heap_1169)' = 0
strlen(&$heap_1169)' = strlen(((char*)$param_2)[64])
$heap_1170' = ((char*)*$param_2)[184]
bytes_after(&$heap_1170)' = strlen(((char*)$param_2)[184]) + 1
$heap_1170' is allocated by malloc
$heap_1170' is allocated
bytes_before(&$heap_1170)' = 0
strlen(&$heap_1170)' = strlen(((char*)$param_2)[184])
hp' = $param_1




Change Warning 2461.2489 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: