Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at ddpro.c:894

Categories: LANG.MEM.NPD CWE:476
Warning ID: 22059.28730
Procedure: addhosts
Trace: view
Modified: Thu Nov 26 11:27:38 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 addhosts
 840 addhosts(mp, rmp) 
 841         struct pmsg *mp;        /* the request message */ 
 842         struct pmsg *rmp;       /* reply message blank */ 
 843 {
 844         struct hostd *hp, *hp2;
 845         struct pmsg *mp2;
 846         struct waitc *wp = 0;
 847         struct waitc_add *wxp = 0;
 848         int i, j;
 849         int count;
 850         int ngood;
 851         int ntid;
 852         struct hostent *he;
 853         int maxhostid = (tidhmask >> ffs(tidhmask) - 1);
 854         int hh;
 855         int pid;
 856         int *tids;
 857         char *winpvmdpath;
 858         char *pvmdpath;
 859         char *vmid;
 860         char *buf;
 861         int len;
 862  
 863         /*
 864         * have to lock this for 2 reasons:
 865         *  1. system can't handle overlapping host table updates,
 866         *  2. the new host tids aren't reserved 
 867         */ 
 868         if (busyadding) {
 869 /*
 870                 pvmlogerror("addhosts() already adding new hosts\n");
 871 */ 
 872                 pkint(rmp, PvmAlready);
 873                 sendmessage(rmp);
 874                 return 0;
 875         }
 876  
 877         busyadding = 1;
 878  
 879         /* sanity check count */ 
 880  
 881         if (upkint(mp, &count) || count < 1 || count > maxhostid) {
 882                 pvmlogerror("addhosts() bad msg format\n");
 883                 goto bad;
 884         }
 885  
 886         /*
 887         * make wait context, extract host list from message,
 888         */ 
 889  
 890         wp = wait_new(WT_HOSTSTART);
 891         wp->wa_tid = mp->m_src;
 892         wp->wa_dep = mp->m_wid;
true893         wxp = TALLOC(1, struct waitc_add, "waix");
wxp <= 4095894         wxp->w_num = count;     /* Null Pointer Dereference */
Preconditions
&$unknown_374612 >= 1
waitlist->wa_wid <= widbase
waitlist->wa_link != waitlist
busyadding = 0
widrange <= lastwid
Postconditions
((char*)**$unknown_374613)[4]' = &$heap_58189
busyadding' = 1
count' = &$unknown_374612
errno' != 0
bytes_after(&$heap_58189)' = 48
$heap_58189' is allocated by malloc
$heap_58189' is allocated
bytes_before(&$heap_58189)' = 0
((char*)&$heap_58189)[16]' = 0
((char*)&$heap_58189)[32]' = &$heap_58189
((char*)&$heap_58189)[36]' = 0
((char*)&$heap_58189)[40]' = 0
((char*)&$heap_58189)[4]' = ((char*)*$unknown_374613)[4]
((char*)&$heap_58189)[44]' = 0
((char*)&$heap_58189)[8]' = widbase + 1
((char*)&$heap_58189)[12]' = 3
lastwid' = 1
maxhostid' >= 1
maxhostid' >= &$unknown_374612
wp' = &$heap_58189
wxp' = 0




Change Warning 22059.28730 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: