Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at tdpro.c:1117

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2707.2760
Procedure: tm_spawn
Trace: View
Modified: Wed Sep 2 12:44:06 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/tdpro.c
   Enter tm_spawn
 1083 tm_spawn(tp, mp) 
 1084         struct task *tp;
 1085         struct pmsg *mp;
 1086 {
 1087         char *where = 0;                                /* location from req */ 
 1088         struct waitc *wp;                               /* 'seed' waitc */ 
 1089         struct waitc_spawn *wxp = 0;    /* new task parameters */ 
 1090         struct htab *htp;                               /* set of usable hosts */ 
 1091         struct hostd *hp;
 1092         int hh;
 1093         int i;
 1094         char *wd = 0;
 1095         char *wdenv = 0;
 1096         char *ptr;
 1097         int sz;
 1098  
 1099         /*
 1100         * unpack spawn command from task 
 1101         */ 
 1102  
 1103         wxp = TALLOC(1, struct waitc_spawn, "waix");
 1104         BZERO((char*)wxp, sizeof(struct waitc_spawn));   /* Null Pointer Dereference (ID: 2708.2761) */
 1105  
 1106         if (upkstralloc(mp, &wxp->w_file) 
 1107         || upkint(mp, &wxp->w_flags) 
 1108         || upkstralloc(mp, &where) 
 1109         || upkint(mp, &wxp->w_veclen) 
 1110         || upkint(mp, &wxp->w_argc))
 1111                 goto bad;
 1112  
 1113         if (wxp->w_veclen < 1)
 1114                 goto bad;
 1115  
true1116         wxp->w_argv = TALLOC(wxp->w_argc + 1, char*, "argv");
wxp->w_argv <= 40951117         BZERO((char*)wxp->w_argv, (wxp->w_argc + 1) * sizeof(char*));     /* Null Pointer Dereference */
Preconditions
&$unknown_973686 >= 1
&$unknown_973691 >= 1
((char*)&$heap_160541)[40] >= 1
Postconditions
$heap_160541' = &$heap_160542
bytes_after(&$heap_160541)' = 112
$heap_160541' is allocated by malloc
bytes_before(&$heap_160541)' = 0
strlen(&$heap_160541)' = 0
((char*)&$heap_160541)[16]' = 0
((char*)&$heap_160541)[12]' = ( &$unknown_973691 - 8 ) / 8
bytes_after(&$heap_160542)' = &$unknown_973686
$heap_160542' is allocated by malloc
bytes_before(&$heap_160542)' = 0
mp' = $param_2
tp' = $param_1
wd' = 0
wdenv' = 0
where' = 0
wxp' = &$heap_160541




Change Warning 2707.2760 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: