pajoye          Sat Oct 20 15:29:04 2007 UTC

  Modified files:              (Branch: PHP_4_4)
    /php-src    NEWS 
    /php-src/ext/gd/libgd       gd.c 
  Log:
  - #43010, Fixed regression in imagearc with two equivelent angles
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.243&r2=1.1247.2.920.2.244&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.243 php-src/NEWS:1.1247.2.920.2.244
--- php-src/NEWS:1.1247.2.920.2.243     Tue Jul 10 20:26:50 2007
+++ php-src/NEWS        Sat Oct 20 15:29:03 2007
@@ -14,6 +14,8 @@
   open_basedir or safe_mode is active (Stas)
 - Fixed session.save_path and error_log values to be checked against
   open_basedir and safe_mode (CVE-2007-3378) (Stas, Maksymilian Arciemowicz)
+- Fixed bug #43010 (Fixed regression in imagearc with two equivelent angles)
+  (Pierre)
 - Fixed bug #41765 (Recode crashes/does not work on amd64) 
   (nexus at smoula dot net, Stas)
 - Fixed bug #41630 (segfault when an invalid color index is present in
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.24.2.36.2.2&r2=1.24.2.36.2.3&diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.24.2.36.2.2 
php-src/ext/gd/libgd/gd.c:1.24.2.36.2.3
--- php-src/ext/gd/libgd/gd.c:1.24.2.36.2.2     Sat Apr 14 17:38:38 2007
+++ php-src/ext/gd/libgd/gd.c   Sat Oct 20 15:29:04 2007
@@ -1607,20 +1607,28 @@
        int lx = 0, ly = 0;
        int fx = 0, fy = 0;
 
-       if (s > 360) {
-               s = s % 360;
-       }
+       if ((s % 360)  == (e % 360)) {
+               s = 0; e = 360;
+       } else {
+               if (s > 360) {
+                       s = s % 360;
+               }
 
-       if (e > 360) {
-               e = e % 360;
-       }
+               if (e > 360) {
+                       e = e % 360;
+               }
 
-       while (s<0) {
-               s += 360;
-       }
+               while (s < 0) {
+                       s += 360;
+               }
 
-       while (e < s) {
-               e += 360;
+               while (e < s) {
+                       e += 360;
+               }
+
+               if (s == e) {
+                       s = 0; e = 360;
+               }
        }
 
        for (i = s; i <= e; i++) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to