Fix shift UB in gd_io.c

This has already been fixed upstream in
24d352576c
and
772d0107a6.
This commit is contained in:
Nikita Popov 2019-06-19 15:06:48 +02:00
parent 1c018af682
commit ea97fc9c1f

View File

@ -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);