Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2819.2879
Procedure: pvm_export
Trace: View
Modified: Wed Sep 2 12:48:11 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 pvm_export
 4785 pvm_export(name) 
 4786         char *name;
 4787 {
 4788         char *vn = "PVM_EXPORT";
 4789         char *e;
 4790         char *p, *q;
 4791         int l;
 4792  
 4793         if (!name[0])
 4794                 goto done;
 4795  
 4796         if (e = getenv(vn)) {
 4797                 p = e;
 4798                 while (*p) {
 4799                         while (*p == ':')
 4800                                 p++;
 4801                         q = p;
 4802                         while (*q && *q != ':')
 4803                                 q++;
 4804                         l = q - p;
 4805                         if (strlen(name) == l && !strncmp(name, p, l))
 4806                                 goto done;
 4807                         p = q;
 4808                 }
true4809                 p = TALLOC(strlen(vn) + strlen(e) + strlen(name) + 3, char, "str");
p <= 40954810                 strcpy(p, vn);     /* Null Pointer Dereference */
Preconditions
&$heap_189379 <= &$unknown_2175744 - 2
*$param_1 != 0
strlen($param_1) >= 1
$unknown_2175744 != 0
$unknown_2175744 != 58
strlen(&$unknown_2175744) = 2
((char*)&$unknown_2175744)[2] = 0
((char*)&$unknown_2175744)[1] != 0
((char*)&$unknown_2175744)[1] != 58
$input_12 >= 1
Postconditions
e' = &$heap_189379
$heap_189379' = 58
bytes_after(&$heap_189379)' = $input_12 + 1
$heap_189379' is allocated by malloc
$heap_189379' is a non-heap object
bytes_before(&$heap_189379)' = 0
strlen(&$heap_189379)' = $input_12
l' = strlen($param_1)
name' = $param_1
p' = 0
q' = &$unknown_2175744 + 2
vn' = &#string54[0]




Change Warning 2819.2879 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: