Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/oniguruma/, dev-libs/oniguruma/files/
Date: Thu, 26 Sep 2019 13:20:52
Message-Id: 1569503989.8a8ed80f11dead7902737ecc602920771c8ed752.whissi@gentoo
1 commit: 8a8ed80f11dead7902737ecc602920771c8ed752
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 26 13:19:49 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 26 13:19:49 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8ed80f
7
8 dev-libs/oniguruma: fix heap buffer overflow
9
10 Link: https://bugs.php.net/bug.php?id=78559
11 Package-Manager: Portage-2.3.76, Repoman-2.3.17
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 ...a-6.9.3-fix-heap-buffer-overflow-php78559.patch | 13 +++++++++
15 dev-libs/oniguruma/oniguruma-6.9.3-r1.ebuild | 34 ++++++++++++++++++++++
16 2 files changed, 47 insertions(+)
17
18 diff --git a/dev-libs/oniguruma/files/oniguruma-6.9.3-fix-heap-buffer-overflow-php78559.patch b/dev-libs/oniguruma/files/oniguruma-6.9.3-fix-heap-buffer-overflow-php78559.patch
19 new file mode 100644
20 index 00000000000..7d538874665
21 --- /dev/null
22 +++ b/dev-libs/oniguruma/files/oniguruma-6.9.3-fix-heap-buffer-overflow-php78559.patch
23 @@ -0,0 +1,13 @@
24 +https://bugs.php.net/bug.php?id=78559
25 +https://github.com/kkos/oniguruma/commit/d3e402928b6eb3327f8f7d59a9edfa622fec557b
26 +
27 +--- a/src/regexec.c
28 ++++ b/src/regexec.c
29 +@@ -4196,6 +4196,7 @@ str_lower_case_match(OnigEncoding enc, int case_fold_flag,
30 + lowlen = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &p, end, lowbuf);
31 + q = lowbuf;
32 + while (lowlen > 0) {
33 ++ if (t >= tend) return 0;
34 + if (*t++ != *q++) return 0;
35 + lowlen--;
36 + }
37
38 diff --git a/dev-libs/oniguruma/oniguruma-6.9.3-r1.ebuild b/dev-libs/oniguruma/oniguruma-6.9.3-r1.ebuild
39 new file mode 100644
40 index 00000000000..2b0d346fc44
41 --- /dev/null
42 +++ b/dev-libs/oniguruma/oniguruma-6.9.3-r1.ebuild
43 @@ -0,0 +1,34 @@
44 +# Copyright 2003-2019 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI="7"
48 +
49 +inherit multilib-minimal
50 +
51 +MY_P="onig-${PV}"
52 +
53 +DESCRIPTION="Regular expression library for different character encodings"
54 +HOMEPAGE="https://github.com/kkos/oniguruma"
55 +SRC_URI="https://github.com/kkos/${PN}/releases/download/v${PV}/${MY_P}.tar.gz"
56 +
57 +LICENSE="BSD-2"
58 +SLOT="0/5"
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
60 +IUSE="crnl-as-line-terminator static-libs"
61 +
62 +PATCHES=( "${FILESDIR}"/${PN}-6.9.3-fix-heap-buffer-overflow-php78559.patch )
63 +
64 +S="${WORKDIR}/${MY_P}"
65 +
66 +DOCS=(AUTHORS HISTORY README{,_japanese} doc/{API,CALLOUTS.API,CALLOUTS.BUILTIN,FAQ,RE}{,.ja} doc/{SYNTAX.md,UNICODE_PROPERTIES})
67 +
68 +multilib_src_configure() {
69 + ECONF_SOURCE="${S}" econf \
70 + $(use_enable crnl-as-line-terminator) \
71 + $(use_enable static-libs static)
72 +}
73 +
74 +multilib_src_install_all() {
75 + einstalldocs
76 + find "${D}" -name "*.la" -type f -delete || die
77 +}