mindtct: Check for multiplication overflow in gen_initial_maps()
Assert if any of the multiplications, which are then used to allocate memory, would overflow. Closes: #99
This commit is contained in:
parent
5459823667
commit
9abc6791c7
1 changed files with 1 additions and 0 deletions
|
@ -272,6 +272,7 @@ int gen_initial_maps(int **odmap, int **olcmap, int **olfmap,
|
||||||
print2log("INITIAL MAP\n");
|
print2log("INITIAL MAP\n");
|
||||||
|
|
||||||
/* Compute total number of blocks in map */
|
/* Compute total number of blocks in map */
|
||||||
|
ASSERT_INT_MUL(mw, mh);
|
||||||
bsize = mw * mh;
|
bsize = mw * mh;
|
||||||
|
|
||||||
/* Allocate Direction Map memory */
|
/* Allocate Direction Map memory */
|
||||||
|
|
Loading…
Reference in a new issue