[php-src] PR #25318: ext/gd: Reject out-of-range XBM dimensions
| From: | iliaal | Date: | Sun, 08 Nov 2026 14:34:02 +0000 |
| Subject: | [php-src] PR #25318: ext/gd: Reject out-of-range XBM dimensions | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40431@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25318
Author: iliaal
Depends on libgd/libgd#1050, which carries the same parse change upstream. An XBM file declaring
#define x_width 4294967298 makes imagecreatefromxbm() decode a 2-pixel-wide image,
because the bundled GD reader parses the dimension with sscanf("%d") and that overflow is
undefined. This parses the value with strtol() and accepts only 1 to INT_MAX. Split from #25293.