summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-24 11:54:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-24 13:16:51 +0100
commit82c3483b2de5ce197e5a7f7ebaf37139518ea261 (patch)
tree07b9bdcd5ba48fc25ad64e20876e719513973d8d /external
parenteca40d828fa8a5d720089cada62719bc8750ca7f (diff)
ubsan: pixman.c:347:10: runtime error: left shift of negative value -1
with fdo64256-1.docx Change-Id: I27dc510b1f178d535bc6b2dace34cdae1d9cd62a Reviewed-on: https://gerrit.libreoffice.org/45222 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/cairo/UnpackedTarball_pixman.mk1
-rw-r--r--external/cairo/pixman/pixman-ubsan.patch11
2 files changed, 12 insertions, 0 deletions
diff --git a/external/cairo/UnpackedTarball_pixman.mk b/external/cairo/UnpackedTarball_pixman.mk
index 6669a8f8be66..cc3dbd11dcc0 100644
--- a/external/cairo/UnpackedTarball_pixman.mk
+++ b/external/cairo/UnpackedTarball_pixman.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,pixman,$(PIXMAN_TARBALL),,cairo))
$(eval $(call gb_UnpackedTarball_add_patches,pixman,\
external/cairo/pixman/pixman-0.24.4.patch \
external/cairo/pixman/pixman-ofz4372.patch \
+ external/cairo/pixman/pixman-ubsan.patch \
))
ifeq ($(OS),WNT)
diff --git a/external/cairo/pixman/pixman-ubsan.patch b/external/cairo/pixman/pixman-ubsan.patch
new file mode 100644
index 000000000000..339a26719947
--- /dev/null
+++ b/external/cairo/pixman/pixman-ubsan.patch
@@ -0,0 +1,11 @@
+--- misc/pixman/pixman/pixman.h
++++ misc/build/pixman/pixman/pixman.h
+@@ -127,7 +127,7 @@
+ #define pixman_fixed_1_minus_e (pixman_fixed_1 - pixman_fixed_e)
+ #define pixman_fixed_minus_1 (pixman_int_to_fixed(-1))
+ #define pixman_fixed_to_int(f) ((int) ((f) >> 16))
+-#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((i) << 16))
++#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((i) * (1 << 16)))
+ #define pixman_fixed_to_double(f) (double) ((f) / (double) pixman_fixed_1)
+ #define pixman_double_to_fixed(d) ((pixman_fixed_t) ((d) * 65536.0))
+ #define pixman_fixed_frac(f) ((f) & pixman_fixed_1_minus_e)