Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmcruft.c:547

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2650.2695
Procedure: pvmcopyenv
Trace: View
Modified: Wed Sep 2 12:42:37 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/pvmcruft.c
   Enter pvmcopyenv
 535 char ** 
 536 pvmcopyenv(anyep) 
 537         char **anyep;           /* old environment to copy, or NULL */ 
 538 {
 539         char **newep;
 540         int i, n;
 541  
 542         if (anyep) {
 543                 for (n = 0; anyep[n]; n++) ;
 544                 if (newep = TALLOC(n + 1, char *, "env")) {
 545                         newep[n] = 0;
 546                         for (i = 0; i < n; i++) {
true547                                 if (!(newep[i] = STRALLOC(anyep[i]))) {     /* Null Pointer Dereference */
Preconditions
&$unknown_785052 = 0
Postconditions
anyep' = $param_1
$heap_43436' is allocated by malloc
$heap_43436' is allocated
bytes_before(&$heap_43436)' = 0
newep' = &$heap_43436




Change Warning 2650.2695 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: