Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at tdpro.c:2165

Categories: LANG.MEM.NPD CWE:476
Warning ID: 309.28986
Procedure: tm_mstat
Trace: view
Modified: Thu Nov 26 11:29:23 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/tdpro.c
   Enter tm_mstat
 2135 tm_mstat(tp, mp) 
 2136         struct task *tp;
 2137         struct pmsg *mp;
 2138 {
 2139         char *name;
 2140         struct hostd *hp;
 2141         struct waitc *wp;
 2142  
 2143         if (upkstralloc(mp, &name)) {
 2144                 pvmlogerror("tm_mstat() bad msg format\n");
 2145                 return 0;
 2146         }
 2147  
 2148         hp = nametohost(hosts, name);
 2149  
 2150         PVM_FREE(name);
 2151  
 2152         if (!hp) {
 2153                 mp = replymessage(mp);
 2154                 pkint(mp, PvmNoHost);
 2155                 sendmessage(mp);
 2156                 return 0;
 2157         }
 2158  
 2159         wp = wait_new(WT_MSTAT);
 2160         wp->wa_tid = tp->t_tid;
 2161         wp->wa_on = hp->hd_hostpart;
 2162         wp->wa_mesg = replymessage(mp);
 2163  
true2164         mp = mesg_new(0);
mp <= 40952165         mp->m_dst = hp->hd_hostpart | TIDPVMD;     /* Null Pointer Dereference */
Preconditions
&$unknown_1030510 >= 1
hosts->ht_last >= 2
numfrags = 0
numpmsgs = 1
widrange <= lastwid
Postconditions
freepmsgs.m_link->m_link->m_rlink' = freepmsgs.m_link->m_rlink
((char*)$unknown_1030512)[4]' = &$heap_334595
((char*)*$unknown_1030512)[4]' = &$heap_334595
freepmsgs.m_link->m_rlink->m_link' = freepmsgs.m_link->m_link
((char*)$unknown_1030514)[4]' = &$unknown_1030513
$unknown_1030513' = &freefrags.fr_link
((char*)&$unknown_1030513)[4]' = ((char*)&$unknown_1030514)[4]
errno' != 0
freefrags.fr_link' = &$unknown_1030513 - 48
freefrags.fr_rlink' = &$unknown_1030513
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
bytes_after(&$heap_334594)' = &$unknown_1030510
$heap_334594' is allocated by malloc
$heap_334594' is freed
bytes_before(&$heap_334594)' = 0
$heap_334595' = $unknown_1030512
bytes_after(&$heap_334595)' = 48
$heap_334595' is allocated by malloc
$heap_334595' is allocated
bytes_before(&$heap_334595)' = 0
((char*)&$heap_334595)[20]' = tp->t_tid
((char*)&$heap_334595)[24]' = 0
((char*)&$heap_334595)[28]' = &$heap_334595
((char*)&$heap_334595)[32]' = &$heap_334595
((char*)&$heap_334595)[36]' = freepmsgs.m_link
((char*)&$heap_334595)[40]' = 0
((char*)&$heap_334595)[4]' = ((char*)$unknown_1030512)[4]
((char*)&$heap_334595)[44]' = 0
((char*)&$heap_334595)[8]' >= ((char*)&$unknown_1030512)[8] + 1
((char*)&$heap_334595)[12]' = 9
hp' = &$unknown_1030511
mp' = 0
name' = &$heap_334594
numfrags' = 499
numpmsgs' = numpmsgs - 1
wp' = &$heap_334595




Change Warning 309.28986 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: