diff --git a/NEWS b/NEWS index 7348d207905..24a763b37c4 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ PHP NEWS - CGI: . Fixed bug #80849 (HTTP Status header truncation). (cmb) +- GD: + . Fixed bug #51498 (imagefilledellipse does not work for large circles). (cmb) + - PDO_ODBC: . Fixed bug #81252 (PDO_ODBC doesn't account for SQL_NO_TOTAL). (cmb) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 9c237530085..7831254b91e 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1715,7 +1715,7 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e void gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c) { int x=0,mx1=0,mx2=0,my1=0,my2=0; - long aq,bq,dx,dy,r,rx,ry,a,b; + int64_t aq,bq,dx,dy,r,rx,ry,a,b; a=w>>1; b=h>>1; @@ -1754,7 +1754,7 @@ void gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c) void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c) { int x=0,mx1=0,mx2=0,my1=0,my2=0; - long aq,bq,dx,dy,r,rx,ry,a,b; + int64_t aq,bq,dx,dy,r,rx,ry,a,b; int i; int old_y2; diff --git a/ext/gd/tests/bug51498.phpt b/ext/gd/tests/bug51498.phpt new file mode 100644 index 00000000000..87478ca7c01 --- /dev/null +++ b/ext/gd/tests/bug51498.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #51498 (imagefilledellipse does not work for large circles) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The images are equal. diff --git a/ext/gd/tests/bug51498_exp.png b/ext/gd/tests/bug51498_exp.png new file mode 100644 index 00000000000..db883907cdc Binary files /dev/null and b/ext/gd/tests/bug51498_exp.png differ