Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at ddpro.c:2570

Categories: LANG.MEM.NPD CWE:476
Warning ID: 156.28778
Procedure: dm_delhost
Trace: view
Modified: Thu Nov 26 11:27:53 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/ddpro.c
   Enter dm_delhost
 2529 dm_delhost(hp, mp) 
 2530         struct hostd *hp;
 2531         struct pmsg *mp;
 2532 {
 2533         int count;
 2534         char *buf;
 2535         struct pmsg *mp2;               /* DELHOSTACK message */ 
 2536         struct pmsg *mp3;               /* HTDEL message */ 
 2537         struct htab *ht_del;    /* hosts to delete */ 
 2538         struct htab *ht_save;   /* remaining hosts */ 
 2539         int hh;
 2540  
 2541 /* XXX danger, this doesn't check if already doing a host add/delete */ 
 2542  
 2543         /* sanity check count */ 
 2544  
 2545         if (upkint(mp, &count)) {
 2546                 pvmlogerror("dm_delhost() bad msg format\n");
 2547                 return 0;
 2548         }
 2549         if (count < 1 || count > (tidhmask >> (ffs(tidhmask) - 1))) {
 2550                 pvmlogerror("dm_delhost() bad count\n");
 2551                 return 0;
 2552         }
 2553  
 2554         /*
 2555         * read host names from message, generate delete and save sets 
 2556         * and a DELHOSTACK reply message with result code for each host.
 2557         * set SHUTDOWN flag for each host in delete set.
 2558         */ 
 2559  
 2560         ht_del = ht_new(1);
 2561         ht_save = ht_new(1);
 2562         ht_merge(ht_save, hosts);
 2563  
 2564         mp2 = mesg_new(0);
 2565         mp2->m_tag = DM_DELHOSTACK;   /* Null Pointer Dereference (ID: 157.28779) */
 2566         mp2->m_wid = mp->m_wid;
 2567         mp2->m_dst = mp->m_src;
 2568  
true2569         mp3 = mesg_new(0);
mp3 <= 40952570         mp3->m_tag = DM_HTDEL;     /* Null Pointer Dereference */
Preconditions
&$unknown_573536 >= 1
hosts->ht_last = 1
numfrags = 0
numpmsgs = 1
Postconditions
freepmsgs.m_link->m_link->m_rlink' = freepmsgs.m_link->m_rlink
freepmsgs.m_link->m_tag' = -2147352562
freepmsgs.m_link->m_rlink->m_link' = freepmsgs.m_link->m_link
((char*)$unknown_573538)[4]' = &$unknown_573537
$unknown_573537' = &freefrags.fr_link
((char*)&$unknown_573537)[4]' = ((char*)&$unknown_573538)[4]
count' = &$unknown_573536
errno' != 0
freefrags.fr_link' = &$unknown_573537 - 48
freefrags.fr_rlink' = &$unknown_573537
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
$heap_69043' = 0
bytes_after(&$heap_69043)' = 32
$heap_69043' is allocated by malloc
$heap_69043' is allocated
bytes_before(&$heap_69043)' = 0
((char*)&$heap_69043)[28]' = &$heap_69044
((char*)&$heap_69043)[4]' = 1
$heap_69044' = 0
bytes_after(&$heap_69044)' = 8
$heap_69044' is allocated by malloc
$heap_69044' is allocated
bytes_before(&$heap_69044)' = 0
$heap_69045' = 0
bytes_after(&$heap_69045)' = 32
$heap_69045' is allocated by malloc
$heap_69045' is allocated
bytes_before(&$heap_69045)' = 0
((char*)&$heap_69045)[24]' >= 0
((char*)&$heap_69045)[24]' <= 1
((char*)&$heap_69045)[28]' = &$heap_69046
((char*)&$heap_69045)[8]' = ((char*)&$heap_69045)[8] + 1
$heap_69046' = 0
$heap_69046' is allocated
bytes_before(&$heap_69046)' = 0
ht_del' = &$heap_69043
ht_save' = &$heap_69045
mp2' = freepmsgs.m_link
mp3' = 0
numfrags' = 499
numpmsgs' = numpmsgs - 1




Change Warning 156.28778 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: