Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at pvmcruft.c:646

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 130.28751
Procedure: pvmxtoi
Trace: view
Modified: Thu Nov 26 11:27:43 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_htupd
true1744 dm_htupd(hp, mp) 
 1745         struct hostd *hp;
 1746         struct pmsg *mp;
 1747 {
 1748         int count;                      /* number of hosts in message */ 
 1749         int hh;
 1750         char buf[16];           /* for converting sockaddr */ 
 1751         struct pmsg *mp2;
 1752  
 1753         /* unpack new host table params */ 
 1754  
 1755         newhosts = ht_new(1);
 1756         newhosts->ht_local = hosts->ht_local;
 1757         upkint(mp, &newhosts->ht_serial);
 1758         upkint(mp, &newhosts->ht_master);
 1759         upkint(mp, &newhosts->ht_cons);
 1760  
 1761         /* add current hosts to the table */ 
 1762  
 1763         ht_merge(newhosts, hosts);
 1764  
 1765         /* unpack new hosts and add to table */ 
 1766  
 1767         /* XXX if we find a host already in table we should kill it with 
 1768            XXX hostfail and put the new one in its place */ 
 1769  
 1770         upkint(mp, &count);
 1771         while (count-- > 0) {
 1772                 upkint(mp, &hh);
 1773                 hp = hd_new(hh);
 1774                 upkstralloc(mp, &hp->hd_name);
 1775                 upkstralloc(mp, &hp->hd_arch);
 1776                 upkstr(mp, buf, sizeof(buf));
buf is uninitialized1777                 hex_inadport(buf, &hp->hd_sad);
     /kat0/fletcher/SATE/2010/pvm3/src/pvmcruft.c
     Enter dm_htupd / hex_inadport
 690   hex_inadport(s, sad) 
 691           char *s;
 692           struct sockaddr_in *sad;
 693   {
*s is uninitialized694           sad->sin_addr.s_addr = htonl((unsigned)pvmxtoi(s));   /* Null Pointer Dereference (ID: 129.28750) */
       Enter dm_htupd / hex_inadport / pvmxtoi
 640     pvmxtoi(p) 
 641             char *p;
 642     {
 643             int i = 0;
 644             char c;
 645      
*p is uninitialized646             if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))     /* Uninitialized Variable */  /* 5 more... */
       Exit dm_htupd / hex_inadport / pvmxtoi
     Exit dm_htupd / hex_inadport
Preconditions
&$unknown_445643 >= 1
&$unknown_445645 >= 1
&$unknown_445649 != 0
hosts->ht_last >= 1
Postconditions
count' = &$unknown_445643 - 1
bytes_after(&$heap_64679)' = 32
$heap_64679' is allocated by malloc
bytes_before(&$heap_64679)' = 0
((char*)&$heap_64679)[20]' = hosts->ht_local
bytes_after(&$heap_64681)' = 120
$heap_64681' is allocated by malloc
$heap_64681' is allocated
bytes_before(&$heap_64681)' = 0
((char*)&$heap_64681)[16]' = 0
((char*)&$heap_64681)[20]' = 0
((char*)&$heap_64681)[8]' = 0
((char*)&$heap_64681)[116]' = 0
((char*)&$heap_64681)[12]' = 0
bytes_after(&$heap_64682)' = 120
$heap_64682' is allocated by malloc
$heap_64682' is allocated
bytes_before(&$heap_64682)' = 0
((char*)&$heap_64682)[16]' = 0
((char*)&$heap_64682)[20]' = 0
((char*)&$heap_64682)[8]' = 0
((char*)&$heap_64682)[116]' = 0
((char*)&$heap_64682)[12]' = 0
bytes_after(&$heap_64683)' = 20
$heap_64683' is allocated by malloc
$heap_64683' is allocated
bytes_before(&$heap_64683)' = 0
((char*)&$heap_64683)[16]' = 0
((char*)&$heap_64683)[8]' = 0
((char*)&$heap_64683)[12]' = 0
bytes_after(&$heap_64684)' = 120
$heap_64684' is allocated by malloc
$heap_64684' is allocated
bytes_before(&$heap_64684)' = 0
((char*)&$heap_64684)[16]' = 0
((char*)&$heap_64684)[20]' = 0
((char*)&$heap_64684)[8]' = 0
((char*)&$heap_64684)[116]' = 0
((char*)&$heap_64684)[12]' = 0
$heap_64685' = 1
bytes_after(&$heap_64685)' = 124
$heap_64685' is allocated by malloc
$heap_64685' is allocated
bytes_before(&$heap_64685)' = 0
((char*)&$heap_64685)[56]' = 2
((char*)&$heap_64685)[72]' = 1
((char*)&$heap_64685)[76]' = 1
((char*)&$heap_64685)[80]' = &$heap_64682
((char*)&$heap_64685)[8]' = &$heap_64686
((char*)&$heap_64685)[84]' = &$heap_64684
((char*)&$heap_64685)[92]' = &$heap_64681
((char*)&$heap_64685)[100]' = 1
((char*)&$heap_64685)[108]' = 1000
((char*)&$heap_64685)[112]' = &$heap_64683
bytes_after(&$heap_64686)' = &$unknown_445645
$heap_64686' is allocated by malloc
bytes_before(&$heap_64686)' = 0
hp' = &$heap_64685
i' = 0
newhosts' = &$heap_64679
p' = &buf[0]
s' = &buf[0]
sad' = &$heap_64685 + 56




Change Warning 130.28751 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: