php-src/ext/gd/libgd
Denis Ryabov b456ae8d34
Restore Warning instead of Fatal Error in gd_webp.c
According to the docs (https://www.php.net/manual/en/function.imagecreatefromwebp.php and https://www.php.net/manual/en/function.imagewebp.php), `false` should be returned on errors (similar to other functions of the `gd` extension), but actually all errors result in a `Fatal Error`. It doesn't look normal when trying to read an empty file or a file in the wrong format causes the program to stop. The problem seems to be related to a mega-patch that replaced `zend_error` with `zend_error_noreturn` almost everywhere. My patch fixes this behavior by switching from `zend_error_noerror` to `gd_error` (i.e. to `E_WARNING` level). All necessary memory cleanup is already in the code (as it was before the "zend_error_noreturn" patch).

Close GH-13774
2024-07-13 16:58:54 +01:00
..
bmp.h
gd.c Fix gdAlphaMax limit typo 2021-09-23 23:16:40 +02:00
gd.h Lossless conversion for webp 2021-08-12 23:19:13 +02:00
gd2copypal.c
gd2time.c
gd2topng.c
gd_avif.c Fix imagecreatefromavif() memory leak 2022-06-17 17:30:57 +02:00
gd_bmp.c
gd_color_match.c
gd_crop.c Fix #81032: GD install is affected by external libgd installation 2021-05-14 12:24:45 +02:00
gd_errors.h
gd_filter.c Merge branch 'PHP-7.3' into PHP-7.4 2019-12-07 12:08:30 +01:00
gd_gd.c Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
gd_gd2.c
gd_gif_in.c
gd_gif_out.c Merge branch 'PHP-7.3' into PHP-7.4 2020-05-22 09:19:05 +02:00
gd_intern.h Add avif support to ext/gd 2021-06-10 12:32:30 +02:00
gd_interpolation.c Add avif support to ext/gd 2021-06-10 12:32:30 +02:00
gd_io.c
gd_io.h
gd_io_dp.c
gd_io_file.c
gd_io_ss.c
gd_jpeg.c Fix some mismatches in preprocessor directive comments 2021-08-02 11:18:36 +02:00
gd_matrix.c Avoid superfluous assignments 2020-01-09 00:17:14 +01:00
gd_pixelate.c
gd_png.c Merge branch 'PHP-8.0' into PHP-8.1 2022-02-08 10:48:21 +01:00
gd_rotate.c Fix GH-10614: imagerotate will turn the picture all black, when rotated 90 2024-01-26 18:15:52 +01:00
gd_security.c Make error messages more consistent by fixing capitalization 2020-01-17 14:52:46 +01:00
gd_ss.c
gd_tga.c Fix [-Wundef] warning in GD extension 2020-05-20 18:22:09 +02:00
gd_tga.h
gd_topal.c ext/gd: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
gd_transform.c
gd_wbmp.c Fix #81032: GD install is affected by external libgd installation 2021-05-14 12:24:45 +02:00
gd_webp.c Restore Warning instead of Fatal Error in gd_webp.c 2024-07-13 16:58:54 +01:00
gd_xbm.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
gdcache.c Fix some mismatches in preprocessor directive comments 2021-08-02 11:18:36 +02:00
gdcache.h Fix [-Wundef] warning in GD extension 2020-05-20 18:22:09 +02:00
gddemo.c
gdfontg.c
gdfontg.h
gdfontl.c
gdfontl.h
gdfontmb.c
gdfontmb.h
gdfonts.c
gdfonts.h
gdfontt.c
gdfontt.h
gdft.c Fix GH-10344: imagettfbbox(): Could not find/open font UNC path 2024-01-25 20:06:28 +01:00
gdhelpers.c
gdhelpers.h
gdkanji.c Remove a redundant expression 2021-08-02 21:51:26 +02:00
gdparttopng.c
gdtables.c
gdtest.c Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
gdtestft.c Fix some mismatches in preprocessor directive comments 2021-08-02 11:18:36 +02:00
gdtopng.c
gdxpm.c
jisx0208.h
pngtogd.c
pngtogd2.c
testac.c
wbmp.c
wbmp.h
webpng.c