Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 314.28991
Procedure: sendmessage
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_hoster
 2333 tm_hoster(tp, mp) 
 2334         struct task *tp;
 2335         struct pmsg *mp;
 2336 {
 2337         int regme;
 2338         struct pmsg *mp2;
 2339  
 2340         if (upkint(mp, &regme)) {
 2341                 pvmlogerror("tm_hoster() bad msg format\n");
 2342                 return 0;
 2343         }
 2344  
true2345         mp2 = replymessage(mp);
 2346  
 2347         /* always wear 2 condoms, who knows if indices are enough... :D */ 
 2348         if (hosts->ht_hosts[hosts->ht_local]->hd_hostpart 
 2349                         != hosts->ht_hosts[hosts->ht_master]->hd_hostpart) {
 2350                 pkint(mp2, PvmHostrNMstr);
 2351                 sendmessage(mp2);
 2352                 return 0;
 2353         }
 2354  
 2355         if (regme) {
 2356                 if (hostertid) {
 2357                         pkint(mp2, PvmAlready);
 2358  
 2359                 } else {
 2360                         hostertid = tp->t_tid;
 2361                         tp->t_flag |= TF_ISHOSTER;
 2362                         if (pvmdebmask & PDMSTARTUP) {
 2363                                 pvmlogprintf("tm_hoster() register t%x \n", tp->t_tid);
 2364                         }
 2365                         pkint(mp2, 0);
 2366                 }
 2367  
 2368         } else {
 2369                 if (hostertid == tp->t_tid) {
 2370                         hostertid = 0;
 2371                         tp->t_flag &= ~TF_ISHOSTER;
 2372                         if (pvmdebmask & PDMSTARTUP) {
 2373                                 pvmlogprintf("tm_hoster() unregister t%x \n", tp->t_tid);
 2374                         }
 2375                         pkint(mp2, 0);
 2376  
 2377                 } else {
 2378                         if (pvmdebmask & PDMSTARTUP) {
 2379                                 pvmlogprintf("tm_hoster() t%x tries to unregister?\n",
 2380                                                 tp->t_tid);
 2381                         }
 2382                         pkint(mp2, PvmNoTask);
 2383                 }
 2384         }
 2385  
mp2 <= 40952386         sendmessage(mp2);
Preconditions
mp->m_cfrag = hostertid
numpmsgs = 0
Postconditions
atnewline' = 1
errno' != 0
ff' = 1
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
hostertid' = 0
hp' = 0
mp' = 0
mp2' = 0
regme' = 0
tmbuf.tm_sec' = &$unknown_1055963




Change Warning 314.28991 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: