Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/, app-text/mupdf/
Date: Thu, 30 Jun 2022 12:45:55
Message-Id: 1656593009.e69ffe486e072430217eb921a1886f93d8d74534.flow@gentoo
1 commit: e69ffe486e072430217eb921a1886f93d8d74534
2 Author: Philipp Rösner <rndxelement <AT> protonmail <DOT> com>
3 AuthorDate: Wed Jun 29 19:36:48 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 30 12:43:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e69ffe48
7
8 app-text/mupdf: fix strict-aliasing violations
9
10 Fix two issues in thirdparty/lcms2/src/cmsplugin.c regarding
11 strinct-aliasing rule violations.
12
13 Closes: https://bugs.gentoo.org/855020
14 Signed-off-by: Philipp Rösner <rndxelement <AT> protonmail.com>
15 Closes: https://github.com/gentoo/gentoo/pull/26152
16 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
17
18 app-text/mupdf/files/mupdf-1.20.0-lcms2.patch | 20 ++++++++++++++++++++
19 app-text/mupdf/mupdf-1.20.0.ebuild | 1 +
20 2 files changed, 21 insertions(+)
21
22 diff --git a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
23 new file mode 100644
24 index 000000000000..a975d42d15e9
25 --- /dev/null
26 +++ b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
27 @@ -0,0 +1,20 @@
28 +--- a/thirdparty/lcms2/src/cmsplugin.c
29 ++++ b/thirdparty/lcms2/src/cmsplugin.c
30 +@@ -177,7 +177,7 @@ cmsBool CMSEXPORT _cmsReadFloat32Number(cmsContext ContextID, cmsIOHANDLER* io,
31 + if (n != NULL) {
32 +
33 + tmp = _cmsAdjustEndianess32(tmp);
34 +- *n = *(cmsFloat32Number*)(void*)&tmp;
35 ++ *n = (cmsFloat32Number)tmp;
36 +
37 + // Safeguard which covers against absurd values
38 + if (*n > 1E+20 || *n < -1E+20) return FALSE;
39 +@@ -308,7 +308,7 @@ cmsBool CMSEXPORT _cmsWriteFloat32Number(cmsContext ContextID, cmsIOHANDLER* io
40 +
41 + _cmsAssert(io != NULL);
42 +
43 +- tmp = *(cmsUInt32Number*) (void*) &n;
44 ++ tmp = (cmsUInt32Number)n;
45 + tmp = _cmsAdjustEndianess32(tmp);
46 + if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), &tmp) != 1)
47 + return FALSE;
48
49 diff --git a/app-text/mupdf/mupdf-1.20.0.ebuild b/app-text/mupdf/mupdf-1.20.0.ebuild
50 index 3d7f8f3e2946..216bbfaa79e7 100644
51 --- a/app-text/mupdf/mupdf-1.20.0.ebuild
52 +++ b/app-text/mupdf/mupdf-1.20.0.ebuild
53 @@ -51,6 +51,7 @@ PATCHES=(
54 "${FILESDIR}"/${PN}-1.15-openssl-x11.patch
55 # General cross fixes from Debian (refreshed)
56 "${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
57 + "${FILESDIR}"/${P}-lcms2.patch
58 )
59
60 src_prepare() {