From: Pierre Joye Date: Sat, 14 Apr 2007 17:30:51 +0000 (+0000) Subject: - libgd #74, gdImageFilledArc, huge CPU usage with large angles X-Git-Tag: RELEASE_1_2_0~317 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e24e904efb937cfc8f2edf24df80040cc0467d52;p=php - libgd #74, gdImageFilledArc, huge CPU usage with large angles --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 6cf29ba1df..ea4cdf7614 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1643,6 +1643,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e int lx = 0, ly = 0; int fx = 0, fy = 0; + if (s > 360) { + s = s % 360; + } + + if (e > 360) { + e = e % 360; + } + while (s<0) { s += 360; }