Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2738.2792
Similar Warnings: 2738.2791, 2738.2793
Procedure: change_output
Trace: View
Modified: Wed Sep 2 12:44:43 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 change_output
 2655 change_output(tp, outtid, outctx, outtag) 
 2656         struct task *tp;
 2657         int outtid, outctx, outtag;
 2658 {
 2659         struct pmsg *mp;
 2660  
 2661         if (tp->t_outtid != outtid 
 2662         || tp->t_outctx != outctx 
 2663         || tp->t_outtag != outtag) {
 2664                 if (tp->t_outtid > 0) {
 2665                         mp = mesg_new(0);
 2666                         mp->m_dst = tp->t_outtid;   /* Null Pointer Dereference (ID: 2738.2793) */
 2667                         mp->m_ctx = tp->t_outctx;
 2668                         mp->m_tag = tp->t_outtag;
 2669                         pkint(mp, tp->t_tid);
 2670                         pkint(mp, TO_EOF);
 2671                         sendmessage(mp);
 2672                 }
 2673                 if (pvmdebmask & PDMTASK) {
 2674                         pvmlogprintf("t%x changes output from <t%x %d %d> to <t%x %d %d>\n",
 2675                                         tp->t_tid,
 2676                                         tp->t_outtid, tp->t_outctx, tp->t_outtag,
 2677                                         outtid, outctx, outtag);
 2678                 }
 2679                 tp->t_outtid = outtid;
 2680                 tp->t_outctx = outctx;
 2681                 tp->t_outtag = outtag;
 2682                 if (tp->t_outtid > 0) {
true2683                         mp = mesg_new(0);
mp <= 40952684                         mp->m_dst = tp->t_outtid;     /* Null Pointer Dereference */
Preconditions
$param_2 >= 1
((char*)$param_1)[144] = $param_2
((char*)$param_1)[144] >= 1
((char*)$param_1)[148] = $param_3
((char*)$param_1)[152] != $param_4
numfrags = 0
numpmsgs != 0
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
atnewline' = 0
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = 0
numpmsgs' = 0
outctx' = $param_3
outtag' = $param_4
outtid' = $param_2
tmbuf.tm_sec' = &$unknown_1181533
tp' = $param_1




Change Warning 2738.2792 : Null Pointer Dereference

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