Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmcruft.c:694

Categories: LANG.MEM.NPD CWE:476
Warning ID: 129.28750
Procedure: hex_inadport
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
 1744 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);
true1773                 hp = hd_new(hh);
 1774                 upkstralloc(mp, &hp->hd_name);
 1775                 upkstralloc(mp, &hp->hd_arch);
 1776                 upkstr(mp, buf, sizeof(buf));
hp <= 40391777                 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   {
sad <= 4095694           sad->sin_addr.s_addr = htonl((unsigned)pvmxtoi(s));     /* Null Pointer Dereference */
     Exit dm_htupd / hex_inadport
 1778                 upkint(mp, &hp->hd_mtu);
 1779                 upkint(mp, &hp->hd_speed);
 1780                 upkint(mp, &hp->hd_dsig);
 1781                 ht_insert(newhosts, hp);
 1782                 hd_unref(hp);
Preconditions
hosts->ht_last >= 1
Postconditions
__x' = 0
count' = 0
errno' != 0
bytes_after(&$heap_64059)' = 32
$heap_64059' is allocated by malloc
bytes_before(&$heap_64059)' = 0
((char*)&$heap_64059)[20]' = hosts->ht_local
hp' = 0
newhosts' = &$heap_64059
s' = &buf[0]
sad' = 56




Change Warning 129.28750 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: