Commit 8daf610e by Alan Mishchenko

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

parent 1b36058a
...@@ -238,7 +238,7 @@ cuddInitInteract( ...@@ -238,7 +238,7 @@ cuddInitInteract(
DdManager * table) DdManager * table)
{ {
int i,j,k; int i,j,k;
int words; ABC_UINT64_T words;
long *interact; long *interact;
int *support; int *support;
DdNode *f; DdNode *f;
...@@ -248,7 +248,7 @@ cuddInitInteract( ...@@ -248,7 +248,7 @@ cuddInitInteract(
int n = table->size; int n = table->size;
words = ((n * (n-1)) >> (1 + LOGBPL)) + 1; 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) { if (interact == NULL) {
table->errorCode = CUDD_MEMORY_OUT; table->errorCode = CUDD_MEMORY_OUT;
return(0); return(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment