Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmd.c:5178

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2553.2584
Procedure: colonsep
Trace: View
Modified: Wed Sep 2 12:40:59 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_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  
 1976         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                         }
true1983                         epaths = colonsep(varsub(s));
     /u1/paul/SATE/2010/c/pvm/pvm3/src/pvmd.c
     Enter dm_slconf / colonsep
 5167   char ** 
$param_1 <= 40955168   colonsep(s) 
 5169           char *s;        /* the string to break up */ 
 5170   {
 5171           char **els;
 5172           int nel = 2;                    /* length of els */ 
 5173           char *p, *q;
 5174    
 5175   #if defined (IMA_OS2) || defined (WIN32) 
 5176           for (p = s; p = CINDEX(p, ';'); p++) 
 5177   #else 
s <= 40955178           for (p = s; p = CINDEX(p, ':'); p++)     /* Null Pointer Dereference */  /* Null Pointer Dereference (ID: 2681.2730) */
     Exit dm_slconf / colonsep
Preconditions
&$unknown_486354 >= 1
&$unknown_486358 != 0
$unknown_486357 != 0
$unknown_486357 != 36
strlen(&$unknown_486357) = 1
((char*)&$unknown_486357)[1] = 0
strlen(&$heap_32582) != 0
Postconditions
$unknown_486362' = $unknown_486357
strlen(&$unknown_486362)' != 0
$heap_32582' = &$unknown_486358
bytes_after(&$heap_32582)' = &$unknown_486354
$heap_32582' is allocated by malloc
bytes_before(&$heap_32582)' = 0
hp' = $param_1
mp' = $param_2
nel' = 2
p' = 0
s' = &$heap_32582
s' = 0
t' = 1




Change Warning 2553.2584 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: