diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 9c237530085df..7831254b91e57 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 0000000000000..87478ca7c01bb --- /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 0000000000000..db883907cdca3 Binary files /dev/null and b/ext/gd/tests/bug51498_exp.png differ