Text  |   XML   |   Visible Warnings:

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

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 22124.29083
Procedure: pvm_delhosts
Trace: view
Modified: Thu Nov 26 11:31:14 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_delhosts
 2097 pvm_delhosts(names, count, svp) 
 2098         char **names;
 2099         int count;
 2100         int *svp;               /* status vector return */ 
 2101 {
 2102         int sbf, rbf;
 2103         int cc;
 2104         int i;
 2105         int *sv;                /* return values */ 
 2106         TEV_DECLS 
 2107  
 2108         if (TEV_EXCLUSIVE) {
 2109                 if (TEV_DO_TRACE(TEV_DELHOSTS,TEV_EVENT_ENTRY)) {
 2110                         TEV_PACK_STRING( TEV_DID_HNL, TEV_DATA_ARRAY,
 2111                                 names, count, 1 );
 2112                         TEV_FIN;
 2113                 }
 2114         }
 2115  
 2116         if (count < 1 || count > (TIDHOST >> (ffs(TIDHOST) - 1))) {
 2117                 cc = PvmBadParam;
 2118  
 2119         } else {
 2120                 if (!(cc = BEATASK)) {
 2121                         sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
 2122                         rbf = pvm_setrbuf(0);
 2123                         pvm_pkint(&count, 1, 1);
 2124                         for (i = 0; i < count; i++)
 2125                                 pvm_pkstr(names[i]);
 2126  
 2127                         if (pvmschedtid)
 2128                                 cc = msendrecv(pvmschedtid, SM_DELHOST, PvmBaseContext);
 2129                         else 
 2130                                 cc = msendrecv(TIDPVMD, TM_DELHOST, SYSCTX_TM);
 2131                         if (cc > 0) {
 2132                                 pvm_upkint(&cc, 1, 1);
 2133                                 if (cc >= 0) {
 2134                                         if (cc == count) {
true2135                                                 sv = TALLOC(count, int, "sv2");     /* Integer Overflow of Allocation Size */
Preconditions
count >= 2
&$unknown_3472423 != 0
&$unknown_3472436 >= 1
&$unknown_3472437 != 0
pvmautoerr != 0
pvmautoerr != 2
pvmautoerr != 3
pvmmytid = -1
pvmtoplvl = 0
$input_12 = 0
Postconditions
cc' = count
i' = count
pvm_errno' = -2
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmmytid' != -1
pvmrbuf' = &$unknown_3472437
pvmschedtid' = &$unknown_3472423
sbf' = -2




Change Warning 22124.29083 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: