Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 145.28766
Procedure: pvmxtoi
Trace: view
Modified: Thu Nov 26 11:27: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
   /kat0/fletcher/SATE/2010/pvm3/src/ddpro.c
   Enter dm_slconf
 1966 dm_slconf(hp, mp) 
 1967         struct hostd *hp;
 1968         struct pmsg *mp;
 1969 {
 1970         int t;                          /* field type */ 
 1971         char *s, *s2;
 1972  
 1973         mp = mp;
 1974         hp = hp;
 1975  
true1976         while (!upkint(mp, &t) && !upkstralloc(mp, &s)) {
 1977                 switch (t) {
 1978  
 1979                 case DM_SLCONF_EP: 
 1980                         if (pvmdebmask & (PDMTASK|PDMSTARTUP)) {
 1981                                 pvmlogprintf("dm_slconf() ep<%s>\n", s);
 1982                         }
 1983                         epaths = colonsep(varsub(s));
 1984                         PVM_FREE(s);
 1985                         break;
 1986  
 1987                 case DM_SLCONF_BP: 
 1988                         if (pvmdebmask & PDMSTARTUP) {
 1989                                 pvmlogprintf("dm_slconf() bp<%s>\n", s);
 1990                         }
 1991                         debugger = varsub(s);
 1992                         PVM_FREE(s);
 1993                         break;
 1994  
 1995                 case DM_SLCONF_WD: 
 1996                         if (pvmdebmask & (PDMTASK|PDMSTARTUP)) {
 1997                                 pvmlogprintf("dm_slconf() wd<%s>\n", s);
 1998                         }
 1999                         s2 = varsub(s);
 2000                         if (chdir(s2) == -1)
 2001                                 pvmlogperror(s2);
 2002                         PVM_FREE(s);
 2003                         PVM_FREE(s2);
 2004                         break;
 2005  
 2006                 case DM_SLCONF_SCHED: 
 2007                         if (pvmdebmask & (PDMSCHED|PDMSTARTUP)) {
 2008                                 pvmlogprintf("dm_slconf() sched<t%x>\n", pvmschedtid);
 2009                         }
s <= 40952010                         pvmschedtid = pvmxtoi(s);
     /kat0/fletcher/SATE/2010/pvm3/src/pvmcruft.c
     Enter dm_slconf / pvmxtoi
 640   pvmxtoi(p) 
 641           char *p;
 642   {
 643           int i = 0;
 644           char c;
 645    
p <= 4095646           if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))     /* Null Pointer Dereference */  /* 5 more... */
     Exit dm_slconf / pvmxtoi
 2011                         break;
 2012  
 2013                 case DM_SLCONF_TRACE: {
 2014                         Pvmtmask tmask;
 2015                         int ttid, tctx, ttag, otid, octx, otag, tbuf, topt;
 2016                         if (pvmdebmask & (PDMTRACE|PDMSTARTUP)) {
 2017                                 pvmlogprintf("dm_slconf() tracer<t%x>\n",
 2018                                         pvmtracer.trctid);
 2019                         }
 2020                         if (sscanf(s, "%x %d %d %x %d %d %d %d %s",
 2021                                         &ttid, &tctx, &ttag, &otid, &octx, &otag,
 2022                                         &tbuf, &topt, tmask) != 9) {   /* Buffer Overrun (ID: 141.28762) */  /* Null Pointer Dereference (ID: 142.28763) */
 2023                                 pvmlogprintf("dm_slconf() bogus string<%s>\n", s);
 2024                         }
 2025                         else {
 2026                                 pvmtracer.trctid = ttid;
 2027                                 pvmtracer.trcctx = tctx;
 2028                                 pvmtracer.trctag = ttag;
 2029                                 pvmtracer.outtid = otid;
 2030                                 pvmtracer.outctx = octx;
 2031                                 pvmtracer.outtag = otag;
 2032                                 pvmtracer.trcbuf = tbuf;
 2033                                 pvmtracer.trcopt = topt;
 2034                                 BCOPY(tmask,pvmtracer.tmask,TEV_MASK_LENGTH);
 2035                         }
 2036                         break;
 2037                 }
 2038  
 2039                 default: 
 2040                         pvmlogprintf("dm_slconf() ? type %d val <%s>\n", t, s);
 2041                         PVM_FREE(s);   /* Free Null Pointer (ID: 144.28765) */
 2042                         break;
Preconditions
&$unknown_458723 >= 1
&$unknown_458725 = 4
Postconditions
atnewline' = 0
i' = 0
p' = 0
pvmschedtid' = &$unknown_458727
s' = 0
t' = &$unknown_458725
tmbuf.tm_sec' = &$unknown_458726




Change Warning 145.28766 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: