Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at lpvmgen.c:3111

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2803.2863
Procedure: pvmgetenvars
Trace: View
Modified: Wed Sep 2 12:47:29 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/lpvmgen.c
   Enter pvmgetenvars
 3098 pvmgetenvars(ep) 
 3099         char ***ep;
 3100 {
 3101         char **xpl;                     /* vars to export */ 
 3102         int mxpl;                       /* cur length of xpl */ 
 3103         int nxpl;                       /* num vars found */ 
 3104         char buf[200];
 3105         char *p, *q;
 3106         int n;
 3107  
 3108         if (p = getenv("PVM_EXPORT")) {
 3109                 mxpl = 5;
true3110                 xpl = TALLOC(mxpl, char *, "env");
xpl <= 40953111                 xpl[0] = p - 11;     /* Null Pointer Dereference */
Preconditions
$input_12 >= 0
Postconditions
ep' = $param_1
$heap_186526' = $input_60
bytes_after(&$heap_186526)' = $input_12 + 1
$heap_186526' is allocated by malloc
$heap_186526' is a non-heap object
bytes_before(&$heap_186526)' = 0
strlen(&$heap_186526)' = $input_12
mxpl' = 5
p' = &$heap_186526
xpl' = 0




Change Warning 2803.2863 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: