Fixing an interger overflow problem in constructing the variable interaction matrix.

This commit is contained in:
Alan Mishchenko 2012-08-08 09:29:43 -07:00
parent 1b36058a4e
commit 8daf610eba
1 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@ cuddInitInteract(
DdManager * table)
{
int i,j,k;
int words;
ABC_UINT64_T words;
long *interact;
int *support;
DdNode *f;
@ -248,7 +248,7 @@ cuddInitInteract(
int n = table->size;
words = ((n * (n-1)) >> (1 + LOGBPL)) + 1;
table->interact = interact = ABC_ALLOC(long,words);
table->interact = interact = ABC_ALLOC(long,(unsigned)words);
if (interact == NULL) {
table->errorCode = CUDD_MEMORY_OUT;
return(0);