Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at job.c:140

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2927.3009
Procedure: job_new
Trace: View
Modified: Wed Sep 2 12:52:48 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/console/job.c
   Enter job_new
 125 struct job * 
 126 job_new(jid) 
 127         int jid;
 128 {
 129         struct job *jp = joblist->j_link;
 130         struct job *jp2;
 131         struct obuf *op;
 132  
 133         while (jp != joblist && jp->j_jid < jid)
 134                 jp = jp->j_link;
 135         if (jp->j_jid != jid) {
 136                 jp2 = TALLOC(1, struct job, "job");
 137                 BZERO((char*)jp2, sizeof(struct job));   /* Null Pointer Dereference (ID: 2928.3010) */
 138                 jp2->j_jid = jid;
true139                 op = TALLOC(1, struct obuf, "obuf");
op <= 4095140                 BZERO((char*)op, sizeof(struct obuf));     /* Null Pointer Dereference */
Preconditions
((char*)*$unknown_3278656)[16] != $param_1
joblist->j_link->j_jid <= $param_1 - 1
((char*)$unknown_3278656)[16] <= $param_1 - 1
*$unknown_3278656 = joblist
joblist->j_link != joblist
Postconditions
$heap_240520' = 0
bytes_after(&$heap_240520)' = 48
$heap_240520' is allocated by malloc
$heap_240520' is allocated
bytes_before(&$heap_240520)' = 0
strlen(&$heap_240520)' = 0
((char*)&$heap_240520)[16]' = $param_1
jid' = $param_1
jp' = *$unknown_3278656
jp2' = &$heap_240520
op' = 0




Change Warning 2927.3009 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: