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:
parent
49e1e98914
commit
a1e69a0e9d
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue