Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmdpack.c:285

Categories: LANG.MEM.NPD CWE:476
Warning ID: 131.28752
Procedure: upkstralloc
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);
hp <= 40831775                 upkstralloc(mp, &hp->hd_arch);
     /kat0/fletcher/SATE/2010/pvm3/src/pvmdpack.c
     Enter dm_htupd / upkstralloc
 274   upkstralloc(mp, ss) 
 275           struct pmsg *mp;                /* message to unpack */ 
 276           char **ss;                              /* return pointer */ 
 277   {
 278           int cc;
 279           int l;
 280    
 281           if (!(cc = (mp->m_codef->dec_int) (mp, (void*)&l, 1, 1, sizeof(int)))) {
 282                   if (l <= 0)
 283                           cc = PvmNoData;
 284                   else {
ss <= 4095285                           *ss = TALLOC(l, char, "ustr");     /* Null Pointer Dereference */
     Exit dm_htupd / upkstralloc
 1776                 upkstr(mp, buf, sizeof(buf));
 1777                 hex_inadport(buf, &hp->hd_sad);
 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
&$unknown_446464 >= 1
hosts->ht_last >= 1
Postconditions
cc' = 0
count' = 0
errno' != 0
bytes_after(&$heap_64750)' = 32
$heap_64750' is allocated by malloc
bytes_before(&$heap_64750)' = 0
((char*)&$heap_64750)[20]' = hosts->ht_local
hp' = 0
l' = &$unknown_446464
mp' = mp
newhosts' = &$heap_64750
ss' = 12




Change Warning 131.28752 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: