com php-src: Fix libgd warnings: ext/gd/libgd/gd.c ext/gd/libgd /gd_gif_in.c ext/gd/libgd/gd_wbmp.c

From: Date: Thu, 11 Apr 2019 13:54:09 +0000
Subject: com php-src: Fix libgd warnings: ext/gd/libgd/gd.c ext/gd/libgd /gd_gif_in.c ext/gd/libgd/gd_wbmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105663@lists.php.net to get a copy of this message
Commit: 9d663cba1abed1697dce5f73a7177ad2d7beaeb7 Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 11 Apr 2019 15:54:09 +0200 Parents: ca47732eee6ed07ac88f427cacb7a27caeaf7845 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9d663cba1abed1697dce5f73a7177ad2d7beaeb7 Log: Fix libgd warnings Changed paths: M ext/gd/libgd/gd.c M ext/gd/libgd/gd_gif_in.c M ext/gd/libgd/gd_wbmp.c Diff: diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 3e3b359..32de38f 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1990,7 +1990,8 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) if (x>x2+1) { FILL_PUSH(y, x2+1, x-1, -dy); } -skip: for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); +skip: + for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); l = x; } while (x<=x2); @@ -2062,7 +2063,8 @@ static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) if (x>x2+1) { FILL_PUSH(y, x2+1, x-1, -dy); } -skip: for(x++; x<=x2 && (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); +skip: + for(x++; x<=x2 && (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); l = x; } while (x<=x2); } diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c index f78e7f3..ee987e8 100644 --- a/ext/gd/libgd/gd_gif_in.c +++ b/ext/gd/libgd/gd_gif_in.c @@ -467,7 +467,7 @@ LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, i if (sd->sp > sd->stack) return *--sd->sp; - while ((code = GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP)) >= 0) { + while ((code = GetCode(fd, &sd->scd, sd->code_size, FALSE, ZeroDataBlockP)) >= 0) { if (code == sd->clear_code) { for (i = 0; i < sd->clear_code; ++i) { sd->table[0][i] = 0; diff --git a/ext/gd/libgd/gd_wbmp.c b/ext/gd/libgd/gd_wbmp.c index fd9edad..13dc9e3 100644 --- a/ext/gd/libgd/gd_wbmp.c +++ b/ext/gd/libgd/gd_wbmp.c @@ -127,8 +127,11 @@ static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) gd_error("Could not save WBMP"); return 1; } + /* des submitted this bugfix: gdFree the memory. */ freewbmp(wbmp); + + return 0; } /* gdImageCreateFromWBMPCtx

« previous php.cvs (#105663) next »