mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
![]() This improvement was done for libgd 2.1.0[1], and the erroneous calculation has been fixed as of libgd 2.2.0[2]. While we're at it we also add the overflow checks of external libgd; these are not really necessary, since `.sx * .sy` overflow was already prevented when the image has been created, and since we're using `safe_emalloc()` the `struct seg` overflow is also prevented. It should be noted that `overflow2()` prevents `int` overflow, while `safe_emalloc()` prevents `size_t` overflow, so the former is more restrictive. For parity with external libgd, this still appears to be a good thing. [1] < |
||
---|---|---|
.. | ||
libgd | ||
tests | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
gd.c | ||
gd.stub.php | ||
gd_arginfo.h | ||
gd_compat.c | ||
gd_compat.h | ||
php_gd.h |