imagick icon indicating copy to clipboard operation
imagick copied to clipboard

Follow up on potential stack corruption

Open Danack opened this issue 4 years ago • 0 comments

On architectures where long is smaller than zend_long (e.g. LLP64), passing long* to zend_parse_parameters() as an l argument, causes stack corruption. I found these cases by running the test suite with a debug build on Windows. There might be more such issues, so a manual code review might be in order.

It also appears to be sensible to check the allowed ranges of the passed values before passing them to ImageMagick functions to avoid wrap-around or truncation.

from https://github.com/Imagick/imagick/pull/495

Danack avatar Nov 09 '21 15:11 Danack