Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmd.c:4444

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2478.2506
Procedure: beprime
Trace: View
Modified: Wed Sep 2 12:39:46 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/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);   /* Leak (ID: 2477.2505) */
 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
((char*)&$heap_3901)[8] >= 0
Postconditions
(*hosts->ht_hosts)->hd_ref' = (*hosts->ht_hosts)->hd_ref + 1
$unknown_94059' = $unknown_94059 + 1
$heap_3901' = 0
bytes_after(&$heap_3901)' = 40
$heap_3901' is allocated by malloc
$heap_3901' is allocated
bytes_before(&$heap_3901)' = 0
strlen(&$heap_3901)' = 0
((char*)&$heap_3901)[20]' = 0
((char*)&$heap_3901)[32]' = &$heap_3902
((char*)&$heap_3901)[4]' = 1
((char*)&$heap_3901)[12]' = hosts->ht_local
$heap_3902' = 0
bytes_after(&$heap_3902)' = 16
$heap_3902' is allocated by malloc
$heap_3902' is allocated
bytes_before(&$heap_3902)' = 0
strlen(&$heap_3902)' = 0
htp' = &$heap_3901
myhostpart' = 0
pvmmyupid' != -1
runstate' = 4




Change Warning 2478.2506 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: