Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmcruft.c:547

Categories: LANG.MEM.NPD CWE:476
Warning ID: 234.28871
Procedure: pvmcopyenv
Trace: view
Modified: Thu Nov 26 11:28:19 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/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")) {   /* Integer Overflow of Allocation Size (ID: 235.28872) */
 545                         newep[n] = 0;
 546                         for (i = 0; i < n; i++) {
true547                                 if (!(newep[i] = STRALLOC(anyep[i]))) {     /* Null Pointer Dereference */
Postconditions
errno' != 0
$heap_75292' is allocated by malloc
$heap_75292' is allocated
bytes_before(&$heap_75292)' = 0
newep' = &$heap_75292




Change Warning 234.28871 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: