mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
mindtct: Check for multiplication overflow in morph_TF_map()
Assert if any of the multiplications, which are then used to allocate memory and run a loop, would overflow. Closes: #92
This commit is contained in:
@@ -677,6 +677,7 @@ int morph_TF_map(int *tfmap, const int mw, const int mh,
|
|||||||
int *mptr;
|
int *mptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
ASSERT_INT_MUL(mw, mh);
|
||||||
|
|
||||||
/* Convert TRUE/FALSE map into a binary byte image. */
|
/* Convert TRUE/FALSE map into a binary byte image. */
|
||||||
cimage = (unsigned char *)malloc(mw*mh);
|
cimage = (unsigned char *)malloc(mw*mh);
|
||||||
|
|||||||
Reference in New Issue
Block a user