summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-19 15:06:48 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-19 15:09:00 +0200
commitea97fc9c1f78c24b59031d8377461976d281972c (patch)
tree64e003f56a1f65ace17bfcb1c60e864f0b40bdeb
parent1c018af6822ccfbe0b4b7050e981136e8a38959a (diff)
downloadphp-git-ea97fc9c1f78c24b59031d8377461976d281972c.tar.gz
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.
-rw-r--r--ext/gd/libgd/gd_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gd_io.c b/ext/gd/libgd/gd_io.c
index 9b5cc0c7dd..1ca822fc9b 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);