Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2820.2880
Procedure: pvm_export
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_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;
   ...
 4808                 }
 4809                 p = TALLOC(strlen(vn) + strlen(e) + strlen(name) + 3, char, "str");
 4810                 strcpy(p, vn);   /* Null Pointer Dereference (ID: 2819.2879) */
 4811                 strcat(p, "=");
 4812                 strcat(p, e);
 4813                 if (e[0])
 4814                         strcat(p, ":");
 4815                 strcat(p, name);
 4816                 pvmputenv(p);
 4817  
 4818         } else {
true4819                 e = TALLOC(strlen(vn) + strlen(name) + 2, char, "str");
e <= 40954820                 strcpy(e, vn);     /* Null Pointer Dereference */
Preconditions
*$param_1 != 0
strlen($param_1) > 0
Postconditions
e' = 0
name' = $param_1
vn' = &#string54[0]




Change Warning 2820.2880 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: