Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Integer Overflow of Allocation Size  at lpvmgen.c:3981

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 22129.29104
Procedure: pvm_archcode
Trace: view
Modified: Thu Nov 26 11:32:38 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 */
Preconditions
arch != 0
&$unknown_6765228 >= 1
&$unknown_6765229 != 0
pvmmytid != -1
pvmtoplvl != 0
pvmtrc.trctid != pvmmytid
pvmtrc.trctid >= 1
pvmtrc.trcopt != 2
pvmtrc.trcopt != 3
$input_12 = 0
Postconditions
cc' = &$unknown_6765228
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmrbuf' = &$unknown_6765229
pvmschedtid' = 0
pvmtoplvl' = 0
pvmtrccodef' = &$unknown_6765206




Change Warning 22129.29104 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: