Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at tdpro.c:2165

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2728.2781
Procedure: tm_mstat
Trace: View
Modified: Wed Sep 2 12:44:28 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/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_1077436 >= 1
hosts->ht_last >= 2
strlen(&$heap_162246) > 0
numfrags = 0
numpmsgs = 1
Postconditions
freepmsgs.m_link->m_link->m_rlink' = freepmsgs.m_link->m_rlink
freepmsgs.m_link->m_rlink->m_link' = freepmsgs.m_link->m_link
$unknown_1077439' = &freefrags.fr_link
((char*)&$unknown_1077439)[8]' = ((char*)&$unknown_1077438)[8]
freefrags.fr_link' = &$unknown_1077439 - 64
freefrags.fr_rlink' = &$unknown_1077439
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
bytes_after(&$heap_162246)' = &$unknown_1077436
$heap_162246' is allocated by malloc
$heap_162246' is freed
bytes_before(&$heap_162246)' = 0
bytes_after(&$heap_162247)' = 80
$heap_162247' is allocated by malloc
$heap_162247' is allocated
bytes_before(&$heap_162247)' = 0
((char*)&$heap_162247)[20]' = 9
((char*)&$heap_162247)[28]' = ((char*)$param_1)[32]
((char*)&$heap_162247)[32]' = 0
((char*)&$heap_162247)[56]' = freepmsgs.m_link
((char*)&$heap_162247)[64]' = 0
((char*)&$heap_162247)[72]' = 0
hp' = &$unknown_1077437
mp' = 0
name' = &$heap_162246
numfrags' = 499
numpmsgs' = numpmsgs - 1
tp' = $param_1
wp' = &$heap_162247




Change Warning 2728.2781 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: