diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 14:04:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 14:04:27 +0100 |
commit | 88a3b813b5937dade3cdc36134170048a792cc5f (patch) | |
tree | 9dbd8c4f8ff22561c805d46ad0bdda399d4506a6 /external/jpeg-turbo | |
parent | 514baf79795018fb68c2d40fcd512dfcafc4101a (diff) |
external/jpeg-turbo: Work around -fsanitize=shift
Change-Id: I83bb6c2a208f2a80f227873b285c939ced6dbc27
Diffstat (limited to 'external/jpeg-turbo')
-rw-r--r-- | external/jpeg-turbo/ubsan.patch | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/external/jpeg-turbo/ubsan.patch b/external/jpeg-turbo/ubsan.patch index fcd5bcf85cbb..e149d48d51e4 100644 --- a/external/jpeg-turbo/ubsan.patch +++ b/external/jpeg-turbo/ubsan.patch @@ -29,3 +29,12 @@ } /* Completed MCU, so update state */ +@@ -402,7 +402,7 @@ + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Scale and output coefficient in natural (dezigzagged) order */ +- (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); ++ (*block)[jpeg_natural_order[k]] = (JCOEF) ((unsigned)s << Al); + } else { + if (r == 15) { /* ZRL */ + k += 15; /* skip 15 zeroes in band */ |