com php-src: Fix shift UB in gd_io.c: ext/gd/libgd/gd _io.c

From: Date: Wed, 19 Jun 2019 13:09:00 +0000
Subject: com php-src: Fix shift UB in gd_io.c: ext/gd/libgd/gd _io.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106887@lists.php.net to get a copy of this message
Commit: ea97fc9c1f78c24b59031d8377461976d281972c Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 19 Jun 2019 15:06:48 +0200 Parents: 1c018af6822ccfbe0b4b7050e981136e8a38959a Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ea97fc9c1f78c24b59031d8377461976d281972c Log: Fix shift UB in gd_io.c This has already been fixed upstream in https://github.com/libgd/libgd/commit/24d352576c024769d18113a28f3be03d54fa1e66 and https://github.com/libgd/libgd/commit/772d0107a6b00a0d6d7191383fe984f8c018b48c. Changed paths: M ext/gd/libgd/gd_io.c Diff: diff --git a/ext/gd/libgd/gd_io.c b/ext/gd/libgd/gd_io.c index 9b5cc0c..1ca822f 100644 --- a/ext/gd/libgd/gd_io.c +++ b/ext/gd/libgd/gd_io.c @@ -117,7 +117,7 @@ int gdGetWordLSB(signed short int *result, gdIOCtx *ctx) int gdGetInt (int *result, gdIOCtx * ctx) { - int r; + unsigned int r; r = (ctx->getC) (ctx); GD_IO_EOF_CHK(r); *result = r << 24; @@ -141,7 +141,7 @@ int gdGetInt (int *result, gdIOCtx * ctx) int gdGetIntLSB(signed int *result, gdIOCtx *ctx) { - int c = 0; + unsigned int c; unsigned int r = 0; c = (ctx->getC) (ctx);

« previous php.cvs (#106887) next »