mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
@@ -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 */
|
||||
ASSERT_INT_MUL(mw, mh);
|
||||
bsize = mw * mh;
|
||||
|
||||
/* Allocate Direction Map memory */
|
||||
|
||||
Reference in New Issue
Block a user