Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmd.c:3602

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2492.2521
Similar Warnings: 2492.2522
Procedure: loclstout
Trace: View
Modified: Wed Sep 2 12:39:51 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/pvmd.c
   Enter loclstout
 3557 loclstout(tp) 
 3558         struct task *tp;
 3559 {
 3560         int n;
 3561         struct pmsg *mp;
 3562  
 3563         static char buf[4000];
 3564  
 3565 #ifndef WIN32 
 3566         n = read(tp->t_out, buf, sizeof(buf) - 1);
 3567 #else 
 3568         n = win32_read_socket(tp->t_out,buf, sizeof(buf) -1); 
 3569 #endif 
 3570  
 3571         if (n < 1) {
 3572                 if (n == 0 || (errno != EINTR 
 3573 #ifndef WIN32 
 3574                                 && errno != EWOULDBLOCK 
 3575 #endif 
 3576                         )) {
 3577                         wrk_fds_delete(tp->t_out, 1);
 3578 #ifndef WIN32 
 3579                         (void)close(tp->t_out);
 3580 #else 
 3581                         (void)_close(tp->t_out); 
   ...
 3586                                 mp->m_dst = tp->t_outtid;   /* Null Pointer Dereference (ID: 2492.2522) */
 3587                                 mp->m_ctx = tp->t_outctx;
 3588                                 mp->m_tag = tp->t_outtag;
 3589                                 pkint(mp, tp->t_tid);
 3590                                 pkint(mp, TO_EOF);
 3591                                 sendmessage(mp);
 3592                                 tp->t_outtid = 0;
 3593                         }
 3594                 }
 3595  
 3596         } else {
true3597                 mp = mesg_new(0);
 3598                 pkint(mp, tp->t_tid);
 3599                 pkint(mp, n);
 3600                 pkbyte(mp, buf, n);
 3601                 if (tp->t_outtid > 0) {
mp <= 40953602                         mp->m_dst = tp->t_outtid;     /* Null Pointer Dereference */
Preconditions
&$unknown_190087 = 0
&$unknown_190088 = 0
&$unknown_190089 = 0
&$unknown_190090 <= 3999
&$unknown_190090 >= 1
((char*)$param_1)[144] >= 1
((char*)$param_1)[104] >= 0
numpmsgs = 0
$input_12 <= 3999
$input_12 = &$unknown_190090
$input_12 >= 1
Postconditions
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = 0
n' = $input_12
tp' = $param_1




Change Warning 2492.2521 : Null Pointer Dereference

Because they are very similar, this warning shares annotations with warning 2492.2522.

Priority:
State:
Finding:
Owner:
Note: