[Libreoffice-commits] core.git: external/jpeg-turbo

Stephan Bergmann sbergman at redhat.com
Tue Feb 9 17:18:34 UTC 2016


 external/jpeg-turbo/UnpackedTarball_jpeg-turbo.mk |    1 +
 external/jpeg-turbo/ubsan.patch                   |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit 721f53712a2b291c559b7ae42bc17538ca5bc8ac
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Feb 9 18:18:06 2016 +0100

    external/jpeg-turbo: Avoid -fsanitize=shift
    
    Change-Id: If039e70f4e533d8253f272c3f45fbc980b37e0c8

diff --git a/external/jpeg-turbo/UnpackedTarball_jpeg-turbo.mk b/external/jpeg-turbo/UnpackedTarball_jpeg-turbo.mk
index 0e252ba..7f97422 100644
--- a/external/jpeg-turbo/UnpackedTarball_jpeg-turbo.mk
+++ b/external/jpeg-turbo/UnpackedTarball_jpeg-turbo.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,jpeg-turbo,0))
 $(eval $(call gb_UnpackedTarball_add_patches,jpeg-turbo,\
 	external/jpeg-turbo/jpeg-turbo.build.patch.1 \
 	$(if $(filter WNT,$(OS)),external/jpeg-turbo/jpeg-turbo.win_build.patch.1) \
+	external/jpeg-turbo/ubsan.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/jpeg-turbo/ubsan.patch b/external/jpeg-turbo/ubsan.patch
new file mode 100644
index 0000000..46d718b
--- /dev/null
+++ b/external/jpeg-turbo/ubsan.patch
@@ -0,0 +1,11 @@
+--- jcphuff.c
++++ jcphuff.c
+@@ -255,7 +255,7 @@
+     if (c == 0xFF) {            /* need to stuff a zero byte? */
+       emit_byte(entropy, 0);
+     }
+-    put_buffer <<= 8;
++    put_buffer = (unsigned) put_buffer << 8;
+     put_bits -= 8;
+   }
+ 


More information about the Libreoffice-commits mailing list