Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmd.c:4444

Categories: LANG.MEM.NPD CWE:476
Warning ID: 73.28660
Procedure: beprime
Trace: view
Modified: Thu Nov 26 11:27:17 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/pvmd.c
   Enter beprime
 4422 beprime() 
 4423 {
 4424         struct htab *htp;
 4425         struct task *tp;
 4426         int i;
 4427  
 4428         runstate = PVMDPRIME;
 4429  
 4430         if ((pvmmyupid = getpid()) == -1) {
 4431                 pvmlogerror("beprime() can't getpid()\n");
 4432                 pvmbailout(0);
 4433         }
 4434  
 4435         myhostpart = 0;
 4436         pvmmytid = TIDPVMD;
 4437  
true4438         htp = ht_new(hosts->ht_local);
 4439         htp->ht_master = hosts->ht_local;
 4440         htp->ht_local = 0;
 4441         ht_insert(htp, hosts->ht_hosts[hosts->ht_local]);
 4442         ht_insert(htp, hosts->ht_hosts[0]);
 4443         htp->ht_hosts[htp->ht_master]->hd_txseq 
*htp->ht_hosts <= 40954444                         = htp->ht_hosts[0]->hd_rxseq;     /* Null Pointer Dereference */
Preconditions
hosts->ht_local <= 0
Postconditions
(*hosts->ht_hosts)->hd_ref' = (*hosts->ht_hosts)->hd_ref + 1
$unknown_68287' = $unknown_68287 + 1
$heap_3514' = 0
bytes_after(&$heap_3514)' = 32
$heap_3514' is allocated by malloc
$heap_3514' is allocated
bytes_before(&$heap_3514)' = 0
((char*)&$heap_3514)[20]' = 0
((char*)&$heap_3514)[24]' >= 0
((char*)&$heap_3514)[24]' <= 1
((char*)&$heap_3514)[28]' = &$heap_3515
((char*)&$heap_3514)[8]' = ((char*)&$heap_3514)[8] + 2
((char*)&$heap_3514)[12]' = hosts->ht_local
$heap_3515' = 0
$heap_3515' is allocated
bytes_before(&$heap_3515)' = 0
htp' = &$heap_3514
myhostpart' = 0
pvmmyupid' != -1
runstate' = 4




Change Warning 73.28660 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: