iliaa Tue Jun 3 20:20:19 2003 EDT Modified files: /php4/ext/gd gd.c /php4/ext/gd/libgd gd.c Log: GD 2.0.15 sync Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.270 php4/ext/gd/gd.c:1.271 --- php4/ext/gd/gd.c:1.270 Tue Jun 3 19:54:55 2003 +++ php4/ext/gd/gd.c Tue Jun 3 20:20:19 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.270 2003/06/03 23:54:55 iliaa Exp $ */ +/* $Id: gd.c,v 1.271 2003/06/04 00:20:19 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -440,7 +440,7 @@ /* }}} */ #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: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.51 php4/ext/gd/libgd/gd.c:1.52 --- php4/ext/gd/libgd/gd.c:1.51 Tue Jun 3 19:54:56 2003 +++ php4/ext/gd/libgd/gd.c Tue Jun 3 20:20:19 2003 @@ -873,11 +873,6 @@ 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 @@ -891,6 +886,15 @@ 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);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php