Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at lpvmpack.c:1735

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2811.2871
Procedure: pvmupkstralloc
Trace: View
Modified: Wed Sep 2 12:47:52 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/lpvmgen.c
   Enter pvm_reg_rm
 3545 pvm_reg_rm(hip) 
 3546         struct pvmhostinfo **hip;
 3547 {
 3548         int old_sched;
 3549         int cc;
 3550         int sbf;
 3551         int rbf;
 3552         /* char buf[256]; XXX static limit, argh (Not Any More! :-) JAK */ 
 3553         static struct pvmhostinfo *hin = 0;
 3554         static int mbindex = -1;
 3555         TEV_DECLS 
 3556  
 3557         if (TEV_EXCLUSIVE) {
 3558                 if (TEV_DO_TRACE(TEV_REG_RM,TEV_EVENT_ENTRY)) {
 3559                         TEV_FIN;
 3560                 }
 3561         }
 3562  
 3563         if (!(cc = BEATASK)) {
 3564                 sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
 3565                 rbf = pvm_setrbuf(0);
 3566  
 3567                 if (pvmschedtid)
 3568                         cc = msendrecv(pvmschedtid, SM_SCHED, PvmBaseContext);
 3569                 else 
 3570                         cc = msendrecv(TIDPVMD, TM_SCHED, SYSCTX_TM);
 3571                 if (cc > 0) {
 3572                         pvm_upkint(&cc, 1, 1);
 3573                         if (cc >= 0) {
 3574                                 if (hin) {
 3575                                         PVM_FREE(hin->hi_name);
 3576                                         PVM_FREE(hin->hi_arch);
 3577  
 3578                                 } else 
true3579                                         hin = TALLOC(1, struct pvmhostinfo, "hi");
 3580                                 pvm_upkint(&hin->hi_tid, 1, 1);
 3581                                 pvmupkstralloc(&(hin->hi_name));
hin <= 40793582                                 pvmupkstralloc(&(hin->hi_arch));
     /u1/paul/SATE/2010/c/pvm/pvm3/src/lpvmpack.c
     Enter pvm_reg_rm / pvmupkstralloc
$param_1 <= 40951724   pvmupkstralloc(ss) 
 1725           char **ss;                              /* return pointer */ 
 1726   {
 1727           int cc;
 1728           int l;
 1729    
 1730           if (!pvmrbuf)
 1731                   cc = PvmNoBuf;
 1732           else {
 1733                   if (!(cc = (pvmrbuf->m_codef->dec_int)
 1734                                   (pvmrbuf, (void*)&l, 1, 1, sizeof(int)))) {
ss <= 40951735                           *ss = TALLOC(l, char, "pustr");     /* Null Pointer Dereference */  /* 2 more... */
     Exit pvm_reg_rm / pvmupkstralloc
Preconditions
&$unknown_2075909 >= 1
&$unknown_2075910 != 0
&$unknown_2075917 = 1
&$unknown_2075918 = 4
&$unknown_2075919 = 1
hin = 0
pvmautoerr != 0
pvmautoerr != 2
pvmautoerr != 3
pvmmytid != -1
pvmtoplvl != 0
pvmtrc.trctid != pvmmytid
pvmtrc.trctid >= 1
pvmtrc.trcopt != 1
pvmtrc.trcopt != 2
pvmtrc.trcopt != 3
Postconditions
cc' = 0
cc' >= 0
$heap_188986' is allocated by malloc
$heap_188986' is allocated
bytes_before(&$heap_188986)' = 0
hin' = 0
hip' = $param_1
l' >= 0
pvm_errno' = -2
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmmytid' != -1
pvmrbuf' = &$unknown_2075910
pvmschedtid' = 0
pvmtoplvl' = 0
pvmtrccodef' = &pvmtrccodef_nop.enc_byte
rbf' = 0
sbf' = -2
ss' = 16




Change Warning 2811.2871 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: