Commit 2295fa9
Andrey Kovalev
ext/standard/image.c: Fix unsafe integer conversion
- 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 <[email protected]>
Signed-off-by: Andrey Kovalev <[email protected]>1 parent 042a975 commit 2295fa9
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
1523 | | - | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1524 | 1529 | | |
1525 | 1530 | | |
1526 | 1531 | | |
| |||
0 commit comments