Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at lpvmpack.c:1735

Categories: LANG.MEM.NPD CWE:476
Warning ID: 22132.29107
Procedure: pvmupkstralloc
Trace: view
Modified: Thu Nov 26 11:32:53 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
   /kat0/fletcher/SATE/2010/pvm3/src/lpvmgen.c
   Enter pvm_getmboxinfo
 4631 pvm_getmboxinfo(pattern, nclasses, classes) 
 4632         char *pattern;                                  /* class name */ 
 4633         int *nclasses;                                  /* number of classes returned */ 
 4634         struct pvmmboxinfo **classes;   /* name list returned */ 
 4635 {
 4636         static struct pvmmboxinfo *clist = (struct pvmmboxinfo *) NULL;
 4637         static int nclist = 0;
 4638  
 4639         int sbf, rbf, cc;
 4640         int i, j;
 4641         TEV_DECLS 
 4642  
 4643         if (TEV_EXCLUSIVE) {
 4644                 if (TEV_DO_TRACE(TEV_GETMBOXINFO,TEV_EVENT_ENTRY)) {
 4645                         TEV_PACK_STRING( TEV_DID_CN, TEV_DATA_SCALAR,
 4646                                 pattern ? pattern : "", 1, 1 );
 4647                         TEV_FIN;
 4648                 }
 4649         }
 4650  
 4651         if ( !pattern )
 4652                 pattern = "";
 4653  
 4654         if ( clist ) {
 4655                 for ( i=0 ; i < nclist ; i++ ) {
 4656                         if ( clist[i].mi_name )
 4657                                 PVM_FREE( clist[i].mi_name );
 4658                         if ( clist[i].mi_indices )
 4659                                 PVM_FREE( clist[i].mi_indices );
 4660                         if ( clist[i].mi_owners )
 4661                                 PVM_FREE( clist[i].mi_owners );
 4662                         if ( clist[i].mi_flags )
 4663                                 PVM_FREE( clist[i].mi_flags );
 4664                 }
 4665                 PVM_FREE( clist );
 4666                 clist = (struct pvmmboxinfo *) NULL;
 4667                 nclist = 0;
 4668         }
 4669  
 4670         if ( !(cc = BEATASK) )
 4671         {
 4672                 sbf = pvm_setsbuf( pvm_mkbuf( PvmDataFoo ) );
 4673                 rbf = pvm_setrbuf( 0 );
 4674                 cc = TMDB_NAMES;
 4675                 pvm_pkint( &cc, 1, 1 );
 4676                 pvm_pkint( &pvmmytid, 1, 1 );
 4677                 pvm_pkstr( pattern );
 4678                 cc = 0;
 4679                 pvm_pkint( &cc, 1, 1 );
 4680                 pvm_pkint( &cc, 1, 1 );
 4681                 if ( (cc = msendrecv( TIDPVMD, TM_DB, SYSCTX_TM )) > 0 ) {
 4682                         pvm_upkint( &cc, 1, 1 );
 4683                         if ( cc >= 0 ) {
 4684                                 pvm_upkint( &nclist, 1, 1 );
true4685                                 clist = TALLOC( nclist, struct pvmmboxinfo, "classes" );   /* Integer Overflow of Allocation Size (ID: 22134.29109) */
clist <= 40954686                                 for ( i=0 ; i < nclist ; i++ ) {
$unknown_42768865 <= 40954687                                         pvmupkstralloc( &(clist[i].mi_name) );
     /kat0/fletcher/SATE/2010/pvm3/src/lpvmpack.c
     Enter pvm_getmboxinfo / pvmupkstralloc
 1724   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 */  /* 3 more... */
     Exit pvm_getmboxinfo / pvmupkstralloc
Preconditions
&$unknown_7532199 >= 1
&$unknown_7532201 != 0
&$unknown_7532202 >= 1
nclist >= 2
pvmautoerr != 2
pvmautoerr != 3
pvmmytid = -1
pvmtoplvl != 0
pvmtrc.trctid >= 1
pvmtrc.trcopt != 1
pvmtrc.trcopt != 2
pvmtrc.trcopt != 3
Postconditions
*clist' is freed
cc' >= 0
cc' = 0
clist' = 0
errno' != 0
i' = 0
nclist' = &$unknown_7532202
pvm_errno' = -2
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmmytid' != -1
pvmrbuf' = &$unknown_7532201
pvmtoplvl' = 0
pvmtrccodef' = &pvmtrccodef_nop.enc_byte
rbf' = -2
ss' = 0




Change Warning 22132.29107 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: