summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-07 16:33:17 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-07 16:33:36 +0100
commit874734c95c087dcc5373599c6f0d8fe71008b00c (patch)
tree2a4c80cb7d7a6f64402f2422778f93bd0c1c9227 /external
parentfc4a339d83652613dbbc4c2cd7b206d6b1115a71 (diff)
external/jpeg-turbo: Work around -fsanitize=shift
Change-Id: I214ecae8c746235d31bfee9ae6adf65fa29ba68b
Diffstat (limited to 'external')
-rw-r--r--external/jpeg-turbo/ubsan.patch9
1 files changed, 9 insertions, 0 deletions
diff --git a/external/jpeg-turbo/ubsan.patch b/external/jpeg-turbo/ubsan.patch
index e149d48d51e4..9e90fe1f2fc7 100644
--- a/external/jpeg-turbo/ubsan.patch
+++ b/external/jpeg-turbo/ubsan.patch
@@ -38,3 +38,12 @@
} else {
if (r == 15) { /* ZRL */
k += 15; /* skip 15 zeroes in band */
+@@ -494,7 +494,7 @@
+ phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
+ int Se = cinfo->Se;
+ int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+- int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
++ int m1 = (unsigned)-1 << cinfo->Al; /* -1 in the bit position being coded */
+ register int s, k, r;
+ unsigned int EOBRUN;
+ JBLOCKROW block;