summaryrefslogtreecommitdiff
path: root/app-text/chasen/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /app-text/chasen/files
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'app-text/chasen/files')
-rw-r--r--app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch21
-rw-r--r--app-text/chasen/files/chasen-uar.patch44
2 files changed, 44 insertions, 21 deletions
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';
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) {