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..80844437652 --- /dev/null +++ b/ext/gd/tests/bug51498.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #51498 (imagefilledellipse does not work for large circles) +--EXTENSIONS-- +gd +--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