summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-24 12:21:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-24 13:44:31 +0100
commit20d4d543a5293abe69c91f407c3c69b04d6d9af6 (patch)
treea25356193dc9eb6bbdd302c31138c06222791d70 /external
parentab58e2e68f969e49b97b28b81225ed1e87df0855 (diff)
ubsan: runtime error: left shift of 255 by 24 places
pixman-fast-path.c:2839:21: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Change-Id: I9afeee371aeef24bfc0c809b142b424c653fea2e Reviewed-on: https://gerrit.libreoffice.org/45223 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/pixman/pixman-ubsan.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/external/cairo/pixman/pixman-ubsan.patch b/external/cairo/pixman/pixman-ubsan.patch
index 339a26719947..a26933b2398d 100644
--- a/external/cairo/pixman/pixman-ubsan.patch
+++ b/external/cairo/pixman/pixman-ubsan.patch
@@ -9,3 +9,14 @@
#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)
+--- misc/pixman/pixman/pixman-fast-path.c
++++ misc/build/pixman/pixman/pixman-fast-path.c
+@@ -2836,7 +2836,7 @@
+ sgtot = CLIP (sgtot, 0, 0xff);
+ sbtot = CLIP (sbtot, 0, 0xff);
+
+- buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
++ buffer[k] = ((uint32_t)satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
+
+ next:
+ vx += ux;