derick Sun Apr 25 15:43:31 2004 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/gd/tests bug28147.phpt
Modified files:
/php-src NEWS
/php-src/ext/gd/libgd gd.c
Log:
- Fixed bug #28147 (Crash with drawing anti-aliased lines)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.648&r2=1.1247.2.649&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.648 php-src/NEWS:1.1247.2.649
--- php-src/NEWS:1.1247.2.648 Fri Apr 23 14:20:39 2004
+++ php-src/NEWS Sun Apr 25 15:43:30 2004
@@ -5,6 +5,7 @@
then 1 character long. (Ilia)
- Fixed handling of return values from storred procedures in mssql_execute()
with multiple result sets returned. (Frank)
+- Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick)
- Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia,
Marcus)
- Fixed bug #28055 (timeout duration too long in feof()/pfsockopen() liveness
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.24.2.29&r2=1.24.2.30&ty=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.24.2.29 php-src/ext/gd/libgd/gd.c:1.24.2.30
--- php-src/ext/gd/libgd/gd.c:1.24.2.29 Wed Apr 14 18:40:16 2004
+++ php-src/ext/gd/libgd/gd.c Sun Apr 25 15:43:30 2004
@@ -1290,7 +1290,9 @@
inc = (dy * 65536) / dx;
while ((x >> 16) < x2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) &
0xFF);
- gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >>
8) & 0xFF);
+ if ((y >> 16) + 1 < im->sy) {
+ gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col,
(~y >> 8) & 0xFF);
+ }
x += (1 << 16);
y += inc;
}
@@ -1310,7 +1312,9 @@
inc = (dx * 65536) / dy;
while ((y>>16) < y2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) &
0xFF);
- gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x
>> 8) & 0xFF);
+ if ((x >> 16) + 1 < im->sx) {
+ gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >>
16),col, (~x >> 8) & 0xFF);
+ }
x += inc;
y += (1<<16);
}
http://cvs.php.net/co.php/php-src/ext/gd/tests/bug28147.phpt?r=1.1&p=1
Index: php-src/ext/gd/tests/bug28147.phpt
+++ php-src/ext/gd/tests/bug28147.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php