Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 85.28676
Similar Warnings: 85.28675
Procedure: loclstout
Trace: view
Modified: Thu Nov 26 11:27:21 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/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); 
 3582 #endif 
 3583                         tp->t_out = -1;
 3584                         if (tp->t_outtid > 0) {
true3585                                 mp = mesg_new(0);
mp <= 40953586                                 mp->m_dst = tp->t_outtid;     /* Null Pointer Dereference */
Preconditions
tp->t_out >= 0
tp->t_outtid >= 1
numpmsgs = 0
Postconditions
atnewline' = 1
errno' != 0
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = 0
n' = -1
tmbuf.tm_sec' = &$unknown_160090




Change Warning 85.28676 : Null Pointer Dereference

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