summaryrefslogtreecommitdiff
path: root/external/jpeg-turbo
diff options
context:
space:
mode:
Diffstat (limited to 'external/jpeg-turbo')
-rw-r--r--external/jpeg-turbo/ubsan.patch12
1 files changed, 10 insertions, 2 deletions
diff --git a/external/jpeg-turbo/ubsan.patch b/external/jpeg-turbo/ubsan.patch
index 46d718bdd6b4..81ff148c57d6 100644
--- a/external/jpeg-turbo/ubsan.patch
+++ b/external/jpeg-turbo/ubsan.patch
@@ -1,11 +1,19 @@
--- jcphuff.c
+++ jcphuff.c
-@@ -255,7 +255,7 @@
+@@ -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 = (unsigned) put_buffer << 8;
++ put_buffer = (uint_least32_t) put_buffer << 8;
put_bits -= 8;
}