summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2022-07-17 22:07:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-25 15:11:46 +0100
commitc82f38999b51a60bd4998680481ae930f26afecd (patch)
tree00b22312c5c6eb72f53612e0fe69404c6a56743b
parent702cf1e964f09d15b3681f20131988fcfdbbd387 (diff)
downloadpoky-c82f38999b51a60bd4998680481ae930f26afecd.tar.gz
harfbuzz: Fix compilation with clang
Fixup commit for prevous CVE-2022-33068 fix. Fixes: | In file included from ../harfbuzz-4.0.1/src/hb-ot-face.cc:39: 4429| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] 4430| if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536) 4431| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4432| || 4433| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: note: cast one or both operands to int to silence this warning 4434| 1 error generated. (From OE-Core rev: 7505ac6da37ba00d4dad74a0312ca20fc17e64df) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch25
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb5
2 files changed, 28 insertions, 2 deletions
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch
new file mode 100644
index 0000000000..0f9b86973b
--- /dev/null
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch
@@ -0,0 +1,25 @@
1From e421613e8f825508afa9a0b54d33085557c37441 Mon Sep 17 00:00:00 2001
2From: Behdad Esfahbod <behdad@behdad.org>
3Date: Wed, 1 Jun 2022 09:07:57 -0600
4Subject: [PATCH] [sbix] Fix conditional
5
6Signed-off: Pavel Zhukov <pavel.zhukov@huawei.com>
7Upstream-Status: Backport [e421613e8f825508afa9a0b54d33085557c37441]
8
9---
10 src/hb-ot-color-sbix-table.hh | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
14index 6efae43cda..d0e2235fb2 100644
15--- a/src/hb-ot-color-sbix-table.hh
16+++ b/src/hb-ot-color-sbix-table.hh
17@@ -298,7 +298,7 @@ struct sbix
18
19 const PNGHeader &png = *blob->as<PNGHeader>();
20
21- if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
22+ if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536)
23 {
24 hb_blob_destroy (blob);
25 return false;
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
index 81518a53ea..b639c276db 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \
11UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" 11UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
12UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar" 12UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"
13 13
14SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\ 14SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz \
15 file://CVE-2022-33068.patch" 15 file://CVE-2022-33068.patch \
16 file://0001-Fix-conditional.patch"
16SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49" 17SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
17 18
18inherit meson pkgconfig lib_package gtk-doc gobject-introspection 19inherit meson pkgconfig lib_package gtk-doc gobject-introspection