]> granicus.if.org Git - php/commitdiff
- Fix #53492, fix crash if aa steps are invalid
authorPierre Joye <pajoye@php.net>
Wed, 8 Dec 2010 08:45:56 +0000 (08:45 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 8 Dec 2010 08:45:56 +0000 (08:45 +0000)
NEWS
ext/gd/gd.c

diff --git a/NEWS b/NEWS
index e129507f6e3ae44aa6a84bc91227f238ac78ff42..cda4f9acfec0a406b9a87517c4168e89f1e7861a 100644 (file)
--- a/NEWS
+++ b/NEWS
     and trailing :: in the filter extension). (Gustavo)
   . Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
     addresses and ::). (Gustavo)
-    
+
+- GD extension:
+  . Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
+
 - GMP extension:
   . Fixed bug #52906 (gmp_mod returns negative result when non-negative is 
     expected). (Stas)
index d2fd45ec91e3eda8c832d9904f2b01f7d5324830..85fb3361a8bbadb80319aa4ab450a5dfbb01dd21 100644 (file)
@@ -4228,6 +4228,11 @@ PHP_FUNCTION(imagepstext)
                return;
        }
 
+       if (aa_steps != 4 || aa_steps != 16) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "AA steps must be 4 or 16");
+               RETURN_FALSE;
+       }
+
        ZEND_FETCH_RESOURCE(bg_img, gdImagePtr, &img, -1, "Image", le_gd);
        ZEND_FETCH_RESOURCE(f_ind, int *, &fnt, -1, "Type 1 font", le_ps_font);