Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmdpack.c:285

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2540.2571
Procedure: upkstralloc
Trace: View
Modified: Wed Sep 2 12:40:46 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
 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 <= 40791775                 upkstralloc(mp, &hp->hd_arch);
     /u1/paul/SATE/2010/c/pvm/pvm3/src/pvmdpack.c
     Enter dm_htupd / upkstralloc
$param_2 <= 4095274   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
Preconditions
&$unknown_456287 >= 1
&$unknown_456294 >= 1
hosts->ht_hosts[1] >= 0
hosts->ht_last >= 2
Postconditions
cc' = 0
count' = &$unknown_456287 - 1
bytes_after(&$heap_31692)' = 40
$heap_31692' is allocated by malloc
bytes_before(&$heap_31692)' = 0
strlen(&$heap_31692)' = 0
((char*)&$heap_31692)[20]' = hosts->ht_local
bytes_after(&$heap_31693)' = &$unknown_456294
$heap_31693' is allocated by malloc
$heap_31693' is allocated
bytes_before(&$heap_31693)' = 0
hp' = 0
l' = &$unknown_456294
mp' = $param_2
mp' = $param_2
newhosts' = &$heap_31692
ss' = 16




Change Warning 2540.2571 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: