Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 276.28948
Similar Warnings: 276.28947
Procedure: tm_connect
Trace: view
Modified: Thu Nov 26 11:29:02 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_connect
 536 tm_connect(tp, mp) 
 537         struct task *tp;
 538         struct pmsg *mp;
 539 {
 540         int ver;                                                /* task's libpvm t-d proto version */ 
 541         char authfn[PVMTMPNAMLEN];      /* t-auth file name */ 
 542         int d;
 543         int cc;
 544  
 545         if (upkint(mp, &ver) || upkstr(mp, authfn, sizeof(authfn))) {
 546                 pvmlogerror("tm_connect() bad msg format\n");
 547                 goto bail;
 548         }
 549  
 550         /*
 551         *       if protocols are not compatible, send nack 
 552         *       context will get flushed after reply is sent 
 553         */ 
 554  
 555         if (ver != TDPROTOCOL) {
 556                 pvmlogprintf("tm_connect() t-d protocol mismatch (%d/%d)\n",
 557                         ver, TDPROTOCOL);
   ...
 613  
 614         mp = replymessage(mp);
 615         pkint(mp, TDPROTOCOL);
 616         pkint(mp, 1);
 617         pkstr(mp, tp->t_authnam);
 618         mp->m_flag |= MM_PRIO;
 619         mesg_to_task(tp, mp);
 620         pmsg_unref(mp);
 621         return 0;
 622  
 623 bail: 
 624  
 625         tp->t_flag |= TF_CLOSE;
 626  
 627         /* better send a failure notification to the task... */ 
 628         /* (is this a good idea, or better to let task hang, */ 
 629         /* i.e. for security purposes - unresponsiveness...?) */ 
true630         mp = replymessage(mp);
 631         pkint(mp, TDPROTOCOL);
 632         pkint(mp, 0);
 633         pkstr(mp, "");
mp <= 4095634         mp->m_flag |= MM_PRIO;     /* Null Pointer Dereference */
Preconditions
&$unknown_812950 != 0
numpmsgs = 0
Postconditions
atnewline' = 1
errno' != 0
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = 0
tmbuf.tm_sec' = &$unknown_812951




Change Warning 276.28948 : Null Pointer Dereference

Because they are very similar, this warning shares annotations with warning 276.28947.
CodeSonar has selected warning 276.28947 to represent this group of similar warnings. In order to edit this group, you must edit warning 276.28947.