Commit 3f92617
Andrey Kovalev
ext/standard/image.c: Fix unsafe integer conversion
- Add checks for image dimensions (width/height/bits/channels) against
INT32_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 3f92617
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
1520 | 1521 | | |
1521 | 1522 | | |
1522 | 1523 | | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
1523 | 1532 | | |
| 1533 | + | |
1524 | 1534 | | |
1525 | 1535 | | |
1526 | 1536 | | |
| |||
0 commit comments