Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at ddpro.c:1895

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2545.2576
Procedure: gotnewhosts
Trace: View
Modified: Wed Sep 2 12:40:52 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 gotnewhosts
 1873 gotnewhosts(htp2, htp1) 
 1874         struct htab *htp2;              /* new host table */ 
 1875         struct htab *htp1;              /* old host table */ 
 1876 {
 1877         struct pmsg *mp;
 1878         struct htab *htp;
 1879         struct waitc *wp, *wp2;
 1880         int hh;
 1881  
 1882         mp = 0;
 1883         for (wp = waitlist->wa_link; wp != waitlist; wp = wp2) {
 1884                 wp2 = wp->wa_link;
 1885                 if (wp->wa_kind == WT_HOSTA) {
 1886                         if (!mp) {
true1887                                 mp = mesg_new(0);
 1888                                 htp = ht_diff(htp2, htp1);
 1889                                 pkint(mp, htp->ht_cnt);
 1890                                 for (hh = htp->ht_last; hh > 0; hh--)
 1891                                         if (htp->ht_hosts[hh])
 1892                                                 pkint(mp, htp->ht_hosts[hh]->hd_hostpart);
 1893                                 ht_free(htp);
 1894                         }
mp <= 40951895                         mp->m_ref++;     /* Null Pointer Dereference */
 1896                         mp->m_dst = wp->wa_mesg->m_dst;
 1897                         mp->m_ctx = wp->wa_mesg->m_ctx;
 1898                         mp->m_tag = wp->wa_mesg->m_tag;
 1899                         sendmessage(mp);
 1900                         if (wp->wa_count != -1 && --wp->wa_count < 1)
 1901                                 wait_delete(wp);
Preconditions
&$unknown_479797 = 0
((char*)$param_1)[4] >= 2
((char*)&((char*)((char*)*$param_1)[32])[8])[80] = 0
((char*)$unknown_479792)[20] = 12
*$unknown_479792 != waitlist
waitlist->wa_link != waitlist
$unknown_479792 != waitlist
((char*)&$heap_31984)[4] >= 2
((char*)&$heap_31984)[8] >= -1
Postconditions
((char*)$heap_31984)[32]' is freed
$heap_31984' = 0
bytes_after(&$heap_31984)' = 40
$heap_31984' is allocated by malloc
$heap_31984' is freed
bytes_before(&$heap_31984)' = 0
strlen(&$heap_31984)' = 0
hh' = 0
htp' = &$heap_31984
htp1' = $param_2
htp2' = $param_1
mp' = 0
wp' = $unknown_479792
wp2' = *$unknown_479792




Change Warning 2545.2576 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: