1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00

Merge branch 'PHP-5.6'

* PHP-5.6:
  updated NEWS
  Fix #69024: imagescale segfault with palette based image
This commit is contained in:
Christoph M. Becker
2015-07-13 15:56:39 +02:00
2 changed files with 20 additions and 0 deletions
+5
View File
@@ -1059,6 +1059,11 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt
gdImagePtr tmp_im;
gdImagePtr dst;
/* Convert to truecolor if it isn't; this code requires it. */
if (!src->trueColor) {
gdImagePaletteToTrueColor(src);
}
tmp_im = gdImageCreateTrueColor(new_width, src_height);
if (tmp_im == NULL) {
return NULL;
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #69024 (imagescale segfault with palette based image)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreate(256, 256);
imagescale($im, 32, 32, IMG_BICUBIC);
imagedestroy($im);
echo "done\n";
?>
--EXPECT--
done