Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at lpvmgen.c:4810

Categories: LANG.MEM.NPD CWE:476
Warning ID: 398.29110
Procedure: pvm_export
Trace: view
Modified: Thu Nov 26 11:32:55 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/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_373714 <= &$unknown_7585817 - 2
*name != 0
strlen(name) >= 1
$unknown_7585817 != 0
$unknown_7585817 != 58
strlen(&$unknown_7585817) = 2
((char*)&$unknown_7585817)[2] = 0
((char*)&$unknown_7585817)[1] != 0
((char*)&$unknown_7585817)[1] != 58
$input_12 >= 1
Postconditions
e' = &$heap_373714
errno' != 0
$heap_373714' = 58
bytes_after(&$heap_373714)' = $input_12 + 1
$heap_373714' is allocated by malloc
$heap_373714' is a non-heap object
bytes_before(&$heap_373714)' = 0
strlen(&$heap_373714)' = $input_12
l' = strlen(name)
p' = 0
q' = &$unknown_7585817 + 2
vn' = &#string54[0]




Change Warning 398.29110 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: