From 88a3b813b5937dade3cdc36134170048a792cc5f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 7 Jan 2015 14:04:27 +0100 Subject: external/jpeg-turbo: Work around -fsanitize=shift Change-Id: I83bb6c2a208f2a80f227873b285c939ced6dbc27 --- external/jpeg-turbo/ubsan.patch | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'external/jpeg-turbo') 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 */ -- cgit