]> granicus.if.org Git - php/commit
Fix #69024: imagescale segfault with palette based image
authorChristoph M. Becker <cmb@php.net>
Mon, 13 Jul 2015 13:43:16 +0000 (15:43 +0200)
committerChristoph M. Becker <cmb@php.net>
Mon, 13 Jul 2015 13:43:16 +0000 (15:43 +0200)
commitbccbd2df218f5a36650581506c4306a58a157cb2
treec0681a4fd9700ade86a99446f8c3371571343a02
parente990c809bb2591ea34187adb07ca5fed3b3f2f73
Fix #69024: imagescale segfault with palette based image

imagescale(..., IMG_BICUBIC) is not supposed to work with palette images, so we
fix that by converting to true color if necessary. Basically the same fix has
already been applied to the external libgd[1].

[1] <https://github.com/libgd/libgd/commit/723ea520bed3b5854df87393c687323d3930edf3>
ext/gd/libgd/gd_interpolation.c
ext/gd/tests/bug69024.phpt [new file with mode: 0644]