[Libreoffice-commits] core.git: external/libmwaw

Stephan Bergmann sbergman at redhat.com
Tue Jan 13 01:55:43 PST 2015


 external/libmwaw/UnpackedTarball_libmwaw.mk |    1 +
 external/libmwaw/ubsan.patch.0              |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit fcfa399067a7606e0ffc426265428b25c8e9260d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 13 10:54:36 2015 +0100

    external/libmwaw: Work around -fsanitize=shift
    
    Change-Id: Ia44ef02bc19653e2a20b2da52f5b5b377950353d

diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk
index e37d82d..5338ce5 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libmwaw,\
 	external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch \
 	external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch \
+	external/libmwaw/ubsan.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libmwaw/ubsan.patch.0 b/external/libmwaw/ubsan.patch.0
new file mode 100644
index 0000000..4a7f210
--- /dev/null
+++ b/external/libmwaw/ubsan.patch.0
@@ -0,0 +1,11 @@
+--- src/lib/WingzParser.cxx
++++ src/lib/WingzParser.cxx
+@@ -1120,7 +1120,7 @@
+   MWAWColor colors[4];
+   for (int i=0; i<4; ++i) { // font, back, unknown,font color
+     val=(int) input->readULong(4);
+-    int col=((val>>16)&0xFF)|(val&0xFF00)|((val<<16)&0xFFFFFF);
++    int col=((val>>16)&0xFF)|(val&0xFF00)|((val&0xFF)<<16);
+     int high=(val>>24);
+     colors[i]=MWAWColor(uint32_t(col)|0xFF000000);
+     switch (i) {


More information about the Libreoffice-commits mailing list