Closed mulle-nat closed 4 months ago
Not sure why the other commits are in here again. Will try to fix this tomorrow.
i definitely feel the notcurses.c
change to be improved (though I thought we'd already merged it? where's my brain these days?)
Closing this as #2768 is the better, mergable of it.
I think you will like this much better. The other code was more or less a mitigation but this should be a better overflow checker. The multiplication does the zero check and the comparison checks that the multiplication doesn't overflow.
calloc
will then do the other overflow check.