Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmd.c:2446

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2501.2531
Procedure: netinput
Trace: View
Modified: Wed Sep 2 12:39:54 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/pvmd.c
   Enter netinput
 2408 netinput() 
 2409 {
 2410         struct sockaddr_in osad;                /* sender's ip addr */ 
 2411 #ifdef SOCKLENISUINT 
 2412 #if defined(IMA_AIX4SP2) || defined(IMA_AIX5SP2) \
 2413                 || defined(IMA_AIX56K64) || defined(IMA_LINUXALPHA)
 2414         unsigned int oslen;
 2415 #else 
 2416         size_t oslen;
 2417 #endif 
 2418 #else 
   ...
 2429         int src;
 2430         int hh;
 2431         int already;
 2432         struct timeval tdiff;                   /* packet rtt */ 
 2433         int rttusec;
 2434  
 2435         /*
 2436         * alloc new pkt buffer and read packet 
 2437         */ 
 2438  
true2439         pp = pk_new(pvmudpmtu);
 2440         if (TDFRAGHDR > DDFRAGHDR)
 2441                 pp->pk_dat += TDFRAGHDR - DDFRAGHDR;   /* Unreachable Computation (ID: 2500.2530) */
 2442  
 2443         oslen = sizeof(osad);
 2444         if ((pp->pk_len = recvfrom(netsock, pp->pk_dat,
 2445                         pp->pk_max - (pp->pk_dat - pp->pk_buf),
pp->pk_dat <= 40952446                         0, (struct sockaddr*)&osad, &oslen)) == -1) {     /* Null Pointer Dereference */
Preconditions
pvmudpmtu = 0
$input_12 >= 0
Postconditions
$heap_5648' = &$heap_5648
bytes_after(&$heap_5648)' = 184
$heap_5648' is allocated by malloc
$heap_5648' is allocated
bytes_before(&$heap_5648)' = 0
((char*)&$heap_5648)[16]' = 0
((char*)&$heap_5648)[176]' = 0
((char*)&$heap_5648)[24]' = 0
((char*)&$heap_5648)[32]' = 0
((char*)&$heap_5648)[40]' = 0
((char*)&$heap_5648)[8]' = &$heap_5648
oslen' = 16
pp' = &$heap_5648




Change Warning 2501.2531 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: