Commit 9abc6791 authored by Bastien Nocera's avatar Bastien Nocera
Browse files

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
parent 54598236
......@@ -272,6 +272,7 @@ int gen_initial_maps(int **odmap, int **olcmap, int **olfmap,
print2log("INITIAL MAP\n");
/* Compute total number of blocks in map */
bsize = mw * mh;
/* Allocate Direction Map memory */
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