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: 22128.29100
Procedure: pvmupkstralloc
Trace: view
Modified: Thu Nov 26 11:32:37 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_archcode
 3945 pvm_archcode(arch) 
 3946         char *arch;
 3947 {
 3948         struct pvmhostinfo *hlist;
 3949         int sbf, rbf, cc;
 3950         int nhost, narch;
 3951         int i;
 3952         TEV_DECLS 
 3953  
 3954         if (TEV_EXCLUSIVE) {
 3955                 if (TEV_DO_TRACE(TEV_ARCHCODE,TEV_EVENT_ENTRY)) {
 3956                         TEV_PACK_STRING( TEV_DID_AN, TEV_DATA_SCALAR,
 3957                                 arch ? arch : "", 1, 1 );
 3958                         TEV_FIN;
 3959                 }
 3960         }
 3961  
 3962         if (!arch)
 3963                 cc = PvmBadParam;
 3964  
 3965         else 
 3966         {
 3967                 /* Go get pvm_config() info...  :-Q :-Q :-Q */ 
 3968                 /* (can't use pvm_config() directly, as stomps */ 
 3969                 /* hostinfo structure...  Damn. */ 
 3970  
 3971                 if (!(cc = BEATASK)) {
 3972                         sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
 3973                         rbf = pvm_setrbuf(0);
 3974                         if (pvmschedtid)
 3975                                 cc = msendrecv(pvmschedtid, SM_CONFIG, PvmBaseContext);
 3976                         else 
 3977                                 cc = msendrecv(TIDPVMD, TM_CONFIG, SYSCTX_TM);
 3978                         if (cc > 0) {
 3979                                 pvm_upkint(&nhost, 1, 1);
 3980                                 pvm_upkint(&narch, 1, 1);
true3981                                 hlist = TALLOC(nhost, struct pvmhostinfo, "hi");   /* Integer Overflow of Allocation Size (ID: 22129.29104) */
hlist <= 40873982                                 for (i = 0; i < nhost; i++) {
$unknown_39464363 <= 40953983                                         pvm_upkint(&hlist[i].hi_tid, 1, 1);
$unknown_39464395 <= 40953984                                         pvmupkstralloc(&(hlist[i].hi_name));
$unknown_39464411 <= 40953985                                         pvmupkstralloc(&(hlist[i].hi_arch));
     /kat0/fletcher/SATE/2010/pvm3/src/lpvmpack.c
     Enter pvm_archcode / 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_archcode / pvmupkstralloc
Preconditions
ss != 0
&$unknown_6757467 >= 1
&$unknown_6757468 != 0
&$unknown_6757469 >= 1
pvmmytid != -1
pvmtoplvl != 0
pvmtrc.trctid != pvmmytid
pvmtrc.trctid >= 1
pvmtrc.trcopt != 2
pvmtrc.trcopt != 3
Postconditions
cc' = &$unknown_6757467
cc' = 0
errno' != 0
hlist' = 0
i' = 0
nhost' = &$unknown_6757469
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmrbuf' = &$unknown_6757468
pvmschedtid' = 0
pvmtoplvl' = 0
pvmtrccodef' = &$unknown_6757445
ss' = 8




Change Warning 22128.29100 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: