diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-03-17 12:15:04 +0100 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-03-17 12:15:04 +0100 |
commit | 64fbe820a6063d1347397457f8aff6eb91183fd4 (patch) | |
tree | 00c1ca17350f19a54e9771c3c4c3b1ad75dc2236 | |
parent | 50fd15dc7a88d8f845115ba46ff92821b3f881de (diff) |
cws tl74: #i107768# fix for thesaurus crash
-rw-r--r-- | hunspell/hunspell-1.2.8-thesfix.patch | 28 | ||||
-rw-r--r-- | hunspell/makefile.mk | 3 |
2 files changed, 30 insertions, 1 deletions
diff --git a/hunspell/hunspell-1.2.8-thesfix.patch b/hunspell/hunspell-1.2.8-thesfix.patch new file mode 100644 index 000000000000..c41fde45050f --- /dev/null +++ b/hunspell/hunspell-1.2.8-thesfix.patch @@ -0,0 +1,28 @@ +--- misc/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:36.998879385 +0100 ++++ misc/build/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:10.416222464 +0100 +@@ -1666,7 +1666,7 @@ + if (!q2) return 0; // bad XML input + if (check_xml_par(q, "type=", "analyze")) { + int n = 0, s = 0; +- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) n = analyze(slst, cw); ++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) n = analyze(slst, cw); + if (n == 0) return 0; + // convert the result to <code><a>ana1</a><a>ana2</a></code> format + for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); +@@ -1687,13 +1687,13 @@ + (*slst)[0] = r; + return 1; + } else if (check_xml_par(q, "type=", "stem")) { +- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) return stem(slst, cw); ++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); + } else if (check_xml_par(q, "type=", "generate")) { +- int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN); ++ int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1); + if (n == 0) return 0; + char * q3 = strstr(q2 + 1, "<word"); + if (q3) { +- if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN)) { ++ if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN - 1)) { + return generate(slst, cw, cw2); + } + } else { diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk index b20e8d135887..db6eb1029d98 100644 --- a/hunspell/makefile.mk +++ b/hunspell/makefile.mk @@ -43,7 +43,8 @@ TARFILE_ROOTDIR=hunspell-1.2.8 PATCH_FILES=\ hunspell-1.2.8.patch \ - hunspell-consts-1.2.8.patch # hunspell#2064983 + hunspell-consts-1.2.8.patch # hunspell#2064983 \ + hunspell-1.2.8-thesfix.patch # hunspell #i107768 .IF "$(GUI)"=="UNX" #CONFIGURE_DIR=$(BUILD_DIR) |