Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 157.28779
Procedure: dm_delhost
Trace: view
Modified: Thu Nov 26 11:27:54 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  
true2564         mp2 = mesg_new(0);
mp2 <= 40952565         mp2->m_tag = DM_DELHOSTACK;     /* Null Pointer Dereference */
Preconditions
&$unknown_573570 >= 1
hosts->ht_last = 1
numpmsgs = 0
Postconditions
count' = &$unknown_573570
errno' != 0
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
$heap_69279' = 0
bytes_after(&$heap_69279)' = 32
$heap_69279' is allocated by malloc
$heap_69279' is allocated
bytes_before(&$heap_69279)' = 0
((char*)&$heap_69279)[28]' = &$heap_69280
((char*)&$heap_69279)[4]' = 1
$heap_69280' = 0
bytes_after(&$heap_69280)' = 8
$heap_69280' is allocated by malloc
$heap_69280' is allocated
bytes_before(&$heap_69280)' = 0
$heap_69281' = 0
bytes_after(&$heap_69281)' = 32
$heap_69281' is allocated by malloc
$heap_69281' is allocated
bytes_before(&$heap_69281)' = 0
((char*)&$heap_69281)[24]' >= 0
((char*)&$heap_69281)[24]' <= 1
((char*)&$heap_69281)[28]' = &$heap_69282
((char*)&$heap_69281)[8]' = ((char*)&$heap_69281)[8] + 1
$heap_69282' = 0
$heap_69282' is allocated
bytes_before(&$heap_69282)' = 0
ht_del' = &$heap_69279
ht_save' = &$heap_69281
mp2' = 0




Change Warning 157.28779 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: