Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 811e1d0

Browse files
committed
Fix GH-19751: imagefill buffer overflow.
1 parent 93865a4 commit 811e1d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎ext/gd/libgd/gd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,9 @@ static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)
20432043
FILL_PUSH(y+1, x, x, -1);
20442044
while (sp>stack) {
20452045
FILL_POP(y, x1, x2, dy);
2046+
if (y > im->sy || x > im->sx) {
2047+
goto skip;
2048+
}
20462049
for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) {
20472050
nc = gdImageTileGet(im,x,y);
20482051
pts[y][x] = 1;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /