[php-src] PR #18661: ext/standard/image.c: Fix unsafe integer conversion
| From: | andr3y-k0v4l3v | Date: | Mon, 26 May 2025 12:30:13 +0000 |
| Subject: | [php-src] PR #18661: ext/standard/image.c: Fix unsafe integer conversion | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31809@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18661
Author: andr3y-k0v4l3v
- Add checks for image dimensions (width/height/bits/channels) against ZEND_LONG_MAX.
- Prevent sign-bit override when converting unsigned int to zend_long on 32-bit platforms.
- Ensure consistent behavior across architectures for getimagesize() results.
Reported-by: Dmitriy Fedin <d.fedin@fobos-nt.ru>