- Updated PCRE to version 6.6. (Andrei)
- Added overflow checks to wordwrap() function. (Ilia)
- Added a check for special characters in the session name. (Ilia)
+- Fixed bug #34360 (bad gif size) (Pierre)
- Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia)
+- Fixed bug #37346 (invalid colormap format) (Pierre)
- Fixed bug #37162 (wddx does not build as a shared extension).
(jdolecek at NetBSD dot org, Ilia)
- Fixed bug #37046 (foreach breaks static scope). (Dmitry)
Background = buf[5];
AspectRatio = buf[6];
- if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */
+ imw = LM_to_uint(buf[0],buf[1]);
+ imh = LM_to_uint(buf[2],buf[3]);
+
+ if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */
if (ReadColorMap(fd, BitPixel, ColorMap)) {
return 0;
}
bitPixel = 1<<((buf[8]&0x07)+1);
- imw = LM_to_uint(buf[4],buf[5]);
- imh = LM_to_uint(buf[6],buf[7]);
+ if (!useGlobalColormap) {
+ if (ReadColorMap(fd, bitPixel, localColorMap)) {
+ return 0;
+ }
+ }
+
if (!(im = gdImageCreate(imw, imh))) {
return 0;
}
im->interlace = BitSet(buf[8], INTERLACE);
if (! useGlobalColormap) {
- if (ReadColorMap(fd, bitPixel, localColorMap)) {
- return 0;
- }
ReadImage(im, fd, imw, imh, localColorMap,
BitSet(buf[8], INTERLACE));
/*1.4//imageCount != imageNumber); */
--- /dev/null
+--TEST--
+Bug #37346 (gdimagecreatefromgif, bad colormap)
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die('skip external GD libraries always fail');
+?>
+--FILE--
+<?php
+$im = imagecreatefromgif(dirname(__FILE__) . '/bug37346.gif');
+?>
+--EXPECTF--
+Warning: imagecreatefromgif() [%s]: '%sbug37346.gif' is not a valid GIF file in %sbug37346.php on line %d
--- /dev/null
+--TEST--
+Bug #37360 (gdimagecreatefromgif, bad image sizes)
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die('skip external GD libraries always fail');
+?>
+--FILE--
+<?php
+$im = imagecreatefromgif(dirname(__FILE__) . '/bug37360.gif');
+var_dump($im);
+?>
+--EXPECTF--
+resource(%d) of type (gd)