summaryrefslogtreecommitdiff
path: root/external/cairo
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-28 08:25:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-10-28 10:44:09 +0100
commitf57e30eb56c1b593dcb9e801202ded9d079d9043 (patch)
treebd43b9caa79a39548121d7600c02f52736fdff63 /external/cairo
parent864e27cd63e45d44eff883ed27c25c055fc2b837 (diff)
external/cairo: Fix another UBSan invalid-shift-base
> pixman-utils.c:217:14: runtime error: left shift of 155 by 24 places cannot be represented in type 'int' ...which happened once while using the LO GUI Change-Id: I174a29e240f09576859308ada56fe240881f0dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104915 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/cairo')
-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 4455d4a324e8..8f68d569e117 100644
--- a/external/cairo/pixman/pixman-ubsan.patch
+++ b/external/cairo/pixman/pixman-ubsan.patch
@@ -183,3 +183,14 @@
w--;
}
+--- misc/pixman/pixman/pixman-utils.c
++++ misc/build/pixman/pixman/pixman-utils.c
+@@ -214,7 +214,7 @@
+ g = float_to_unorm (src[i].g, 8);
+ b = float_to_unorm (src[i].b, 8);
+
+- dst[i] = (a << 24) | (r << 16) | (g << 8) | (b << 0);
++ dst[i] = ((uint32_t)a << 24) | (r << 16) | (g << 8) | (b << 0);
+ }
+ }
+