public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/chasen/files/, app-text/chasen/
@ 2021-11-22 14:52 Akinori Hattori
  0 siblings, 0 replies; 2+ messages in thread
From: Akinori Hattori @ 2021-11-22 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     f79eeb6f40f8f00c9b757066c25892c1ca812732
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 14:51:57 2021 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 14:51:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f79eeb6f

app-text/chasen: fix stack use after return

Closes: https://bugs.gentoo.org/825018
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 app-text/chasen/chasen-2.4.5.ebuild    |  2 ++
 app-text/chasen/files/chasen-uar.patch | 44 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/app-text/chasen/chasen-2.4.5.ebuild b/app-text/chasen/chasen-2.4.5.ebuild
index 48d64ea7ef9a..d7433b71a1f0 100644
--- a/app-text/chasen/chasen-2.4.5.ebuild
+++ b/app-text/chasen/chasen-2.4.5.ebuild
@@ -18,6 +18,8 @@ RDEPEND="virtual/libiconv"
 DEPEND=">=dev-libs/darts-0.32"
 PDEPEND=">=app-dicts/ipadic-2.7.0"
 
+PATCHES=( "${FILESDIR}"/${PN}-uar.patch )
+
 src_configure() {
 	econf $(use_enable static-libs static)
 

diff --git a/app-text/chasen/files/chasen-uar.patch b/app-text/chasen/files/chasen-uar.patch
new file mode 100644
index 000000000000..631e0890f751
--- /dev/null
+++ b/app-text/chasen/files/chasen-uar.patch
@@ -0,0 +1,44 @@
+--- a/lib/print.c
++++ b/lib/print.c
+@@ -997,20 +997,20 @@
+ static int
+ get_compound(mrph_data_t *data, char *headword, darts_t *da, long index)
+ {
+-    mrph_t mrph;
++    mrph_t *mrph = data->mrph;
+     int has_next, hw_len;
+     char *base = da_get_lex_base(da) + index;
+ 
+     hw_len = ((short *)base)[0];
+     has_next = ((short *)base)[1];
+     base += sizeof(short) * 2;
+-    memcpy(&mrph, base, sizeof(da_lex_t));
+-    mrph.headword = headword;
+-    mrph.headword_len = hw_len;
+-    mrph.is_undef = 0;
+-    mrph.darts = da;
++    memcpy(mrph, base, sizeof(da_lex_t));
++    mrph->headword = headword;
++    mrph->headword_len = hw_len;
++    mrph->is_undef = 0;
++    mrph->darts = da;
+ 
+-    get_mrph_data(&mrph, data);
++    get_mrph_data(mrph, data);
+ 
+     return has_next;
+ }
+@@ -1028,10 +1028,13 @@
+         cha_printf_mrph(lat, path_num, mdata, format); 
+     } else {
+ 	mrph_data_t data;
++	mrph_t m;
+ 	long index = mdata->compound;
+ 	int has_next = 1;
+ 	char *headword = mrph->headword;
+ 
++	data.mrph = &m;
++
+ 	while (has_next) {
+ 	    has_next = get_compound(&data, headword, mrph->darts, index);
+ 	    if (!has_next) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/chasen/files/, app-text/chasen/
@ 2021-11-22 14:52 Akinori Hattori
  0 siblings, 0 replies; 2+ messages in thread
From: Akinori Hattori @ 2021-11-22 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     c9d4876047a753ba4c8310507136e9220c799a1c
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 14:41:55 2021 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 14:41:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9d48760

app-text/chasen: update to version 2.4.5

This is the same as the version 2.4.4 with the fix for CVE-2011-4000.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 app-text/chasen/Manifest                            |  2 +-
 .../{chasen-2.4.4-r3.ebuild => chasen-2.4.5.ebuild} |  4 +---
 .../chasen/files/chasen-2.4.4-cve-2011-4000.patch   | 21 ---------------------
 3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/app-text/chasen/Manifest b/app-text/chasen/Manifest
index de495ce1cb55..0a4c5e4b144c 100644
--- a/app-text/chasen/Manifest
+++ b/app-text/chasen/Manifest
@@ -1 +1 @@
-DIST chasen-2.4.4.tar.gz 845720 BLAKE2B ae18e71d78588c108f747abc6f28835f90d0a2c84616a01d87acea2ae5e0e54ef6ff296ebb9dbdce9047a223bd34203cf2763e9b3d4fb28522a4add7bc823860 SHA512 4551d28be6c0de7a585decf03cf5b56def3d181cfdfd975565ac7236e2c3e8cc0bcf5331f1ae309a914f95c6715e13ba3e9d80ebbd6e86c2316a43b7ed831075
+DIST chasen-2.4.5.tar.xz 671064 BLAKE2B 3b9867f794a54c4b0552807c54694e9f52082d9712c9e64aa55840b70f3a3800a514d1cd36260ee7397d1e98f28909e9b3e1f5c14d64f28f666b876e130aeb3e SHA512 7a17fe9d534cdc07c147fd7d9350aba381390943f4cfd899393076efe8e6a80aae029a8d4833e91ffa945b3e52d6598c16db257c9cc8d7792b7a1f90b7a1948e

diff --git a/app-text/chasen/chasen-2.4.4-r3.ebuild b/app-text/chasen/chasen-2.4.5.ebuild
similarity index 89%
rename from app-text/chasen/chasen-2.4.4-r3.ebuild
rename to app-text/chasen/chasen-2.4.5.ebuild
index 2e8a2e5f4013..48d64ea7ef9a 100644
--- a/app-text/chasen/chasen-2.4.4-r3.ebuild
+++ b/app-text/chasen/chasen-2.4.5.ebuild
@@ -7,7 +7,7 @@ inherit perl-module
 
 DESCRIPTION="Japanese Morphological Analysis System, ChaSen"
 HOMEPAGE="https://chasen-legacy.osdn.jp/"
-SRC_URI="mirror://sourceforge.jp/${PN}-legacy/32224/${P}.tar.gz"
+SRC_URI="mirror://sourceforge.jp/${PN}-legacy/56305/${P}.tar.xz"
 
 LICENSE="BSD"
 SLOT="0"
@@ -18,8 +18,6 @@ RDEPEND="virtual/libiconv"
 DEPEND=">=dev-libs/darts-0.32"
 PDEPEND=">=app-dicts/ipadic-2.7.0"
 
-PATCHES=( "${FILESDIR}"/${P}-cve-2011-4000.patch )
-
 src_configure() {
 	econf $(use_enable static-libs static)
 

diff --git a/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch b/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch
deleted file mode 100644
index 61480622e40a..000000000000
--- a/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/lib/chalib.c b/lib/chalib.c
-index 5d79e13..cddf51b 100644
---- a/lib/chalib.c
-+++ b/lib/chalib.c
-@@ -306,9 +306,14 @@ chasen_sparse_main(char *input, FILE *output)
-      */
-     while (*input) {
- 	int c = 0, len, cursor;
--	if ((crlf = strpbrk(input, "\r\n")) == NULL)
-+	if ((crlf = strpbrk(input, "\r\n")) == NULL) {
- 	    len = strlen(input);
--	else {
-+	    if (len >= CHA_INPUT_SIZE) {
-+		len = CHA_INPUT_SIZE - 1;
-+		crlf = input + CHA_INPUT_SIZE - 2;
-+		c = 0;
-+	    }
-+	} else {
- 	    len = crlf - input;
- 	    c = *crlf;
- 	    *crlf = '\0';


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-22 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22 14:52 [gentoo-commits] repo/gentoo:master commit in: app-text/chasen/files/, app-text/chasen/ Akinori Hattori
  -- strict thread matches above, loose matches on Subject: below --
2021-11-22 14:52 Akinori Hattori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox