Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at ddpro.c:2576

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 155.28777
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
true2529 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  
 2569         mp3 = mesg_new(0);
 2570         mp3->m_tag = DM_HTDEL;   /* Null Pointer Dereference (ID: 156.28778) */
 2571         pkint(mp3, hosts->ht_serial);
 2572  
 2573         pkint(mp2, count);
 2574         while (count-- > 0) {
 2575                 upkstralloc(mp, &buf);
buf is uninitialized2576                 if (hp = nametohost(hosts, buf)) {     /* Uninitialized Variable */
Preconditions
&$unknown_573302 >= 1
&$unknown_573303 = &$unknown_573304 - 92
&$unknown_573308 != 0
hosts->ht_last = 1
numpmsgs = 0
Postconditions
((char*)$unknown_573303)[4]' = ((char*)&$unknown_573303)[4]
((char*)$unknown_573305)[4]' = ((char*)&$unknown_573305)[4]
((char*)$unknown_573303)[4]' = $unknown_573303
((char*)$unknown_573305)[4]' = $unknown_573305
$unknown_573304' = &freepmsgs.m_link
((char*)&$unknown_573304)[4]' = ((char*)&$unknown_573303)[4]
$unknown_573305' = &$unknown_573305
((char*)&$unknown_573305)[16]' = 0
((char*)&$unknown_573305)[20]' = 0
((char*)&$unknown_573305)[24]' = 1
((char*)&$unknown_573305)[26]' = 1
((char*)&$unknown_573305)[26]' = 0
((char*)&$unknown_573305)[4]' = &$unknown_573305
((char*)&$unknown_573305)[44]' = 0
((char*)&$unknown_573305)[8]' = 0
((char*)&$unknown_573305)[12]' = 0
count' = &$unknown_573302 - 1
freefrags.fr_link' = &$unknown_573305
freepmsgs.m_link' = &$unknown_573303
freepmsgs.m_rlink' = &$unknown_573304
$heap_68807' = 0
bytes_after(&$heap_68807)' = 32
$heap_68807' is allocated by malloc
$heap_68807' is allocated
bytes_before(&$heap_68807)' = 0
((char*)&$heap_68807)[28]' = &$heap_68808
((char*)&$heap_68807)[4]' = 1
$heap_68808' = 0
bytes_after(&$heap_68808)' = 8
$heap_68808' is allocated by malloc
$heap_68808' is allocated
bytes_before(&$heap_68808)' = 0
$heap_68809' = 0
bytes_after(&$heap_68809)' = 32
$heap_68809' is allocated by malloc
$heap_68809' is allocated
bytes_before(&$heap_68809)' = 0
((char*)&$heap_68809)[24]' >= 0
((char*)&$heap_68809)[24]' <= 1
((char*)&$heap_68809)[28]' = &$heap_68810
((char*)&$heap_68809)[8]' = ((char*)&$heap_68809)[8] + 1
$heap_68810' = 0
$heap_68810' is allocated
bytes_before(&$heap_68810)' = 0
ht_del' = &$heap_68807
ht_save' = &$heap_68809
mp2' = &$unknown_573303
mp3' = &$unknown_573303
numpmsgs' = 48




Change Warning 155.28777 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: