Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2550.2581
Procedure: colonsep
Trace: View
Modified: Wed Sep 2 12:40:57 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/pvmd.c
   Enter colonsep
 5167 char ** 
 5168 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 
 5178         for (p = s; p = CINDEX(p, ':'); p++)   /* Null Pointer Dereference (ID: 2553.2584) */  /* Null Pointer Dereference (ID: 2681.2730) */
 5179 #endif 
 5180                 nel++;
true5181         els = TALLOC(nel, char*, "path");
 5182  
 5183         nel = 0;
 5184         for (p = s; p; p = q) {
 5185 #if defined (IMA_OS2) || defined (WIN32) 
 5186                 if (q = CINDEX(p, ';')) 
 5187 #else 
 5188                 if (q = CINDEX(p, ':'))
 5189 #endif 
 5190                         *q++ = 0;
els <= 40955191                 els[nel++] = p;     /* Null Pointer Dereference */
Postconditions
$unknown_483071' = 0
strlen(&$unknown_483071)' = 0
els' = 0
nel' = 1
p' = $param_1
q' = &$unknown_483071 + 1
s' = $param_1




Change Warning 2550.2581 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: