Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at lpvm.c:3500

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2834.2895
Procedure: pvm_getfds
Trace: View
Modified: Wed Sep 2 12:49:26 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/lpvm.c
   Enter pvm_getfds
 3471 pvm_getfds(fds)         /* XXX this function kinda sucks */ 
 3472         int **fds;                      /* fd list return */ 
 3473 {
 3474         static int *fdlist = 0;
 3475         static int fdlen = 0;
 3476         int cc;
 3477         int nfds;
 3478         struct ttpcb *pcbp;
 3479         TEV_DECLS 
 3480  
 3481         if (TEV_EXCLUSIVE) {
 3482                 if (TEV_DO_TRACE(TEV_GETFDS,TEV_EVENT_ENTRY))
 3483                         TEV_FIN;
 3484         }
 3485  
 3486         if (!(cc = BEATASK)) {
 3487                 nfds = 1;
 3488                 for (pcbp = ttlist->tt_link; pcbp != ttlist; pcbp = pcbp->tt_link)
 3489                         if (pcbp->tt_state == TTOPEN || pcbp->tt_state == TTGRNWAIT)
 3490                                 nfds++;
 3491  
 3492                 if (fdlen < nfds) {
 3493                         fdlen = (nfds * 3) / 2 + 1;
 3494                         if (fdlist)
 3495                                 fdlist = TREALLOC(fdlist, fdlen, int);
 3496                         else 
true3497                                 fdlist = TALLOC(fdlen, int, "fdlist");
 3498                 }
 3499  
fdlist <= 40953500                 fdlist[0] = topvmd->tt_fd;     /* Null Pointer Dereference */
Preconditions
&$unknown_2467495 != $unknown_2467495
&$unknown_2467495 != $unknown_2467496
&$unknown_2467495 = *$unknown_2467496
((char*)$unknown_2467496)[20] = 2
fdlist = 0
pvmmytid = -1
pvmtoplvl != 0
pvmtrc.trctid >= 1
pvmtrc.trcopt <= 3
pvmtrc.trcopt >= 1
Postconditions
cc' = 0
fdlen' >= 0
fdlist' = 0
fds' = $param_1
pcbp' = *$unknown_2467496
pvm_useruid' != -1
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmmytid' = -1
pvmtoplvl' = 0
ttlist' = &$unknown_2467495




Change Warning 2834.2895 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: