]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Wed, 4 Jun 2003 00:22:30 +0000 (00:22 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 4 Jun 2003 00:22:30 +0000 (00:22 +0000)
NEWS
ext/gd/gd.c
ext/gd/libgd/gd.c

diff --git a/NEWS b/NEWS
index f91fb95ece4e315e2452a491ac3f752f58ca1f68..7c68c090fce5019d623a825393a3183fa932bb8e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,7 +17,7 @@ PHP 4                                                                      NEWS
 - Added long options into CLI & CGI (e.g. --version). (Marcus)
 - Fixed ext/yaz to not log unless yaz.log_file is set. (Adam Dickmeiss)
 - Fixed ext/exif to honor "magic_quotes_runtime" php.ini option. (Marcus)
-- Synchronized bundled GD library with GD 2.0.14. (Ilia)
+- Synchronized bundled GD library with GD 2.0.15. (Ilia)
 - Added integer overflow checks to bundled GD library. (Ilia)
 - Fixed bug #23913 (make rename() work across partitions on *nix). (Ilia)
 - Fixed bug #23912 (Invalid CSS in phpinfo() output). (Ilia)
index 75a3f255c22b4d8f7acab984786ccbdaef69959f..d4bb5b540237b7728aa3df94c1b44838af22bb24 100644 (file)
@@ -386,7 +386,7 @@ PHP_RSHUTDOWN_FUNCTION(gd)
 /* }}} */
 
 #if HAVE_GD_BUNDLED
-#define PHP_GD_VERSION_STRING "bundled (2.0.14 compatible)"
+#define PHP_GD_VERSION_STRING "bundled (2.0.15 compatible)"
 #elif HAVE_LIBGD20
 #define PHP_GD_VERSION_STRING "2.0 or higher"
 #elif HAVE_GDIMAGECOLORRESOLVE
index 9f128a5ae630f2843591549424a0e818f1cc9b00..fbd63be86fcc5b354ee198fb761bdd624328abee 100644 (file)
@@ -873,11 +873,6 @@ static void gdImageAntiAliasedApply (gdImagePtr im, int px, int py)
        float p_dist, p_alpha;
        unsigned char opacity;
 
-       /* 2.0.13: bounds check! AA_opacity is just as capable of overflowing as the main pixel array. Arne Jorgensen. */
-       if (!gdImageBoundsSafeMacro(im, px, py)) {
-               return;
-       }
-
        /* 
         * Find the perpendicular distance from point C (px, py) to the line 
         * segment AB that is being drawn.  (Adapted from an algorithm from the
@@ -892,6 +887,15 @@ static void gdImageAntiAliasedApply (gdImagePtr im, int px, int py)
        int Bx_Cx = im->AAL_x2 - px;
        int By_Cy = im->AAL_y2 - py;
 
+       /* 2.0.13: bounds check! AA_opacity is just as capable of
+        * overflowing as the main pixel array. Arne Jorgensen. 
+        * 2.0.14: typo fixed. 2.0.15: moved down below declarations
+        * to satisfy non-C++ compilers.
+        */
+       if (!gdImageBoundsSafeMacro(im, px, py)) {
+               return;
+       }
+
        /* Get the squares of the lengths of the segemnts AC and BC. */
        LAC_2 = (Ax_Cx * Ax_Cx) + (Ay_Cy * Ay_Cy);
        LBC_2 = (Bx_Cx * Bx_Cx) + (By_Cy * By_Cy);