Text  |   XML   |   Visible Warnings:

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

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 22121.29080
Procedure: pvm_config
Trace: view
Modified: Thu Nov 26 11:31:09 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_config
 2022 pvm_config(nhostp, narchp, hostp) 
 2023         int *nhostp;
 2024         int *narchp;
 2025         struct pvmhostinfo **hostp;
 2026 {
 2027         int sbf, rbf, cc;
 2028         static int nhost = 0;
 2029         static int narch = 0;
 2030         static struct pvmhostinfo *hlist = 0;
 2031         int i;
 2032         /* char buf[256]; XXX static limit, argh (Not Any More! :-) JAK */ 
 2033         TEV_DECLS 
 2034  
 2035         if (TEV_EXCLUSIVE) {
 2036                 if (TEV_DO_TRACE(TEV_CONFIG,TEV_EVENT_ENTRY))
 2037                         TEV_FIN;
 2038         }
 2039  
 2040         if (hlist) {
 2041                 while (nhost-- > 0) {
 2042                         PVM_FREE(hlist[nhost].hi_name);
 2043                         PVM_FREE(hlist[nhost].hi_arch);
 2044                 }
 2045                 PVM_FREE(hlist);
 2046                 hlist = 0;
 2047                 nhost = 0;
 2048         }
 2049         if (!(cc = BEATASK)) {
 2050                 sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
 2051                 rbf = pvm_setrbuf(0);
 2052                 if (pvmschedtid)
 2053                         cc = msendrecv(pvmschedtid, SM_CONFIG, PvmBaseContext);
 2054                 else 
 2055                         cc = msendrecv(TIDPVMD, TM_CONFIG, SYSCTX_TM);
 2056                 if (cc > 0) {
 2057                         pvm_upkint(&nhost, 1, 1);
 2058                         pvm_upkint(&narch, 1, 1);
true2059                         hlist = TALLOC(nhost, struct pvmhostinfo, "hi");     /* Integer Overflow of Allocation Size */
Preconditions
&$unknown_3322861 >= 1
&$unknown_3322862 != 0
hlist != 0
myfmt != -1
nhost <= 0
pvmmytid = -1
pvmtoplvl != 0
$input_12 = 0
Postconditions
*hlist' is freed
cc' = &$unknown_3322861
hlist' = 0
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmrbuf' = &$unknown_3322862
pvmschedtid' = 0
pvmtoplvl' = 0
rbf' = 0




Change Warning 22121.29080 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: