--- jcphuff.c +++ jcphuff.c @@ -14,6 +14,7 @@ * suspension. */ +#include #define JPEG_INTERNALS #include "jinclude.h" #include "jpeglib.h" @@ -255,7 +256,7 @@ if (c == 0xFF) { /* need to stuff a zero byte? */ emit_byte(entropy, 0); } - put_buffer <<= 8; + put_buffer = (uint_least32_t) put_buffer << 8; put_bits -= 8; }