diff options
Diffstat (limited to 'external/libjpeg-turbo/ubsan.patch')
-rw-r--r-- | external/libjpeg-turbo/ubsan.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/external/libjpeg-turbo/ubsan.patch b/external/libjpeg-turbo/ubsan.patch new file mode 100644 index 000000000000..81ff148c57d6 --- /dev/null +++ b/external/libjpeg-turbo/ubsan.patch @@ -0,0 +1,19 @@ +--- jcphuff.c ++++ jcphuff.c +@@ -14,6 +14,7 @@ + * suspension. + */ + ++#include <stdint.h> + #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; + } + |