Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at pvmcruft.c:646

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2538.2569
Procedure: pvmxtoi
Trace: View
Modified: Wed Sep 2 12:40:45 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
   /u1/paul/SATE/2010/c/pvm/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);
     /u1/paul/SATE/2010/c/pvm/pvm3/src/pvmcruft.c
     Enter dm_htupd / hex_inadport
*$param_1 is uninitialized690   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: 2539.2570) */
       Enter dm_htupd / hex_inadport / pvmxtoi
*$param_1 is uninitialized640     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_454615 >= 1
&$unknown_454617 >= 1
&$unknown_454619 >= 1
&$unknown_454625 != 0
hosts->ht_last = 1
((char*)&$heap_31420)[8] >= -1
Postconditions
count' = &$unknown_454615 - 1
bytes_after(&$heap_31420)' = 40
$heap_31420' is allocated by malloc
bytes_before(&$heap_31420)' = 0
strlen(&$heap_31420)' = 0
((char*)&$heap_31420)[20]' = hosts->ht_local
((char*)&$heap_31420)[24]' = 0
((char*)&$heap_31420)[8]' = ((char*)&$heap_31420)[8] + 1
$heap_31421' = 1
bytes_after(&$heap_31421)' = 200
$heap_31421' is allocated by malloc
$heap_31421' is allocated
bytes_before(&$heap_31421)' = 0
strlen(&$heap_31421)' = 0
((char*)&$heap_31421)[136]' = &$heap_31425
((char*)&$heap_31421)[152]' = 1
((char*)&$heap_31421)[16]' = &$heap_31427
((char*)&$heap_31421)[168]' = 1000
((char*)&$heap_31421)[176]' = &$heap_31422
((char*)&$heap_31421)[8]' = &$heap_31426
((char*)&$heap_31421)[88]' = 2
((char*)&$heap_31421)[104]' = 1
((char*)&$heap_31421)[108]' = 1
((char*)&$heap_31421)[112]' = &$heap_31424
((char*)&$heap_31421)[120]' = &$heap_31423
$heap_31422' = &$heap_31422
bytes_after(&$heap_31422)' = 32
$heap_31422' is allocated by malloc
$heap_31422' is allocated
bytes_before(&$heap_31422)' = 0
((char*)&$heap_31422)[16]' = 0
((char*)&$heap_31422)[20]' = 0
((char*)&$heap_31422)[24]' = 0
((char*)&$heap_31422)[8]' = &$heap_31422
bytes_after(&$heap_31423)' = 184
$heap_31423' is allocated by malloc
$heap_31423' is allocated
bytes_before(&$heap_31423)' = 0
((char*)&$heap_31423)[16]' = 0
((char*)&$heap_31423)[176]' = 0
((char*)&$heap_31423)[24]' = 0
((char*)&$heap_31423)[32]' = 0
((char*)&$heap_31423)[40]' = 0
bytes_after(&$heap_31424)' = 184
$heap_31424' is allocated by malloc
$heap_31424' is allocated
bytes_before(&$heap_31424)' = 0
((char*)&$heap_31424)[16]' = 0
((char*)&$heap_31424)[176]' = 0
((char*)&$heap_31424)[24]' = 0
((char*)&$heap_31424)[32]' = 0
((char*)&$heap_31424)[40]' = 0
$heap_31425' = &$heap_31425
bytes_after(&$heap_31425)' = 184
$heap_31425' is allocated by malloc
$heap_31425' is allocated
bytes_before(&$heap_31425)' = 0
((char*)&$heap_31425)[16]' = 0
((char*)&$heap_31425)[176]' = 0
((char*)&$heap_31425)[24]' = 0
((char*)&$heap_31425)[32]' = 0
((char*)&$heap_31425)[40]' = 0
((char*)&$heap_31425)[8]' = &$heap_31425
bytes_after(&$heap_31426)' = &$unknown_454617
$heap_31426' is allocated by malloc
bytes_before(&$heap_31426)' = 0
bytes_after(&$heap_31427)' = &$unknown_454619
$heap_31427' is allocated by malloc
bytes_before(&$heap_31427)' = 0
hp' = &$heap_31421
i' = 0
mp' = $param_2
newhosts' = &$heap_31420
p' = &buf[0]
s' = &buf[0]
sad' = &$heap_31421 + 88




Change Warning 2538.2569 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: