fix undefined behaviour (int shifted too much to the left)

This commit is contained in:
Thomas Bernard 2020-11-10 03:00:12 +01:00
parent 2e822691d7
commit 19ff8a6e97
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF

View File

@ -3048,7 +3048,7 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw
tsize_t len; /* Output this many bytes */
len = raw_l + 1;
val32 = *++raw_p << 24; /* Prime the pump */
val32 = (uint32)*++raw_p << 24; /* Prime the pump */
if ( --raw_l > 0 ) val32 += *(++raw_p) << 16;
if ( --raw_l > 0 ) val32 += *(++raw_p) << 8;