Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 399.29111
Procedure: pvm_export
Trace: view
Modified: Thu Nov 26 11:32:56 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;
   ...
 4808                 }
 4809                 p = TALLOC(strlen(vn) + strlen(e) + strlen(name) + 3, char, "str");
 4810                 strcpy(p, vn);   /* Null Pointer Dereference (ID: 398.29110) */
 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
*name != 0
strlen(name) > 0
Postconditions
e' = 0
errno' != 0
vn' = &#string54[0]




Change Warning 399.29111 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: