Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2821.2881
Procedure: pvm_unexport
Trace: View
Modified: Wed Sep 2 12:48:12 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_unexport
 4836 pvm_unexport(name) 
 4837         char *name;
 4838 {
 4839         char *vn = "PVM_EXPORT";
 4840         char *e, *enew;
 4841         char *p, *q;
 4842         int l;
 4843  
 4844         if (!name[0])
 4845                 goto done;
 4846  
 4847         if (e = getenv(vn)) {
 4848                 p = e;
 4849                 while (*p) {
 4850                         while (*p == ':')
 4851                                 p++;
 4852                         q = p;
 4853                         while (*q && *q != ':')
 4854                                 q++;
 4855                         l = q - p;
 4856                         if (strlen(name) == l && !strncmp(name, p, l)) {
 4857                                 if (*q == ':')
 4858                                         q++;
 4859                                 else if (p > e && *(p - 1) == ':')
 4860                                         p--;
true4861                                 enew = TALLOC(strlen(vn) + (p - e) + strlen(q) + 2, char, "str");
enew <= 40954862                                 strcpy(enew, vn);     /* Null Pointer Dereference */
Preconditions
&$unknown_2176462 <= &$unknown_2176463 - 2
&$heap_189425 <= &$unknown_2176462
*$param_1 != 0
strlen($param_1) >= 1
$unknown_2176462 = 58
strlen(&$unknown_2176462) != strlen($param_1) + 2
strlen(&$unknown_2176462) > strlen($param_1) + 2
strlen(&$unknown_2176462) > 3
((char*)&$unknown_2176462)[2] != 0
((char*)&$unknown_2176462)[2] != 58
((char*)&$unknown_2176462)[1] = 58
$unknown_2176463 != 0
$unknown_2176463 != 58
strlen(&$unknown_2176463) = 2
((char*)&$unknown_2176463)[2] = 0
((char*)&$unknown_2176463)[1] != 0
((char*)&$unknown_2176463)[1] != 58
$input_12 >= 1
Postconditions
codesonar_distance_tweak' = 3
e' = &$heap_189425
enew' = 0
$heap_189425' = 58
bytes_after(&$heap_189425)' = $input_12 + 1
$heap_189425' is allocated by malloc
$heap_189425' is a non-heap object
bytes_before(&$heap_189425)' = 0
strlen(&$heap_189425)' = $input_12
l' = strlen($param_1)
name' = $param_1
p' = &$unknown_2176462 + 1
q' = &$unknown_2176463 + 2
vn' = &#string54[0]




Change Warning 2821.2881 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: