[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - external/icu
external/icu/UnpackedTarball_icu.mk |3 external/icu/icu.changeset_36724.patch.1 | 37 external/icu/icu.changeset_36727.patch.1 | 52 + external/icu/icu.changeset_36801.patch.1 | 1222 +++ 4 files changed, 1314 insertions(+) New commits: commit f5b5f04068ff89ed3db9bf990120853b012558d9 Author: Eike Rathke er...@redhat.com Date: Sat Apr 11 00:03:21 2015 +0200 icu: various regex fixes Backported from http://bugs.icu-project.org/trac/changeset/36724 http://bugs.icu-project.org/trac/changeset/36727 http://bugs.icu-project.org/trac/changeset/36801 Change-Id: Ib9a0d47466287fdc1d33fb191c97bc2c45116c80 Reviewed-on: https://gerrit.libreoffice.org/15237 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index af9c751..e785d6f 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -27,6 +27,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-icu11131.patch.1 \ external/icu/icu4c-scriptrun.patch \ external/icu/icu4c-icu11451.patch.1 \ + external/icu/icu.changeset_36724.patch.1 \ + external/icu/icu.changeset_36727.patch.1 \ + external/icu/icu.changeset_36801.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/icu/icu.changeset_36724.patch.1 b/external/icu/icu.changeset_36724.patch.1 new file mode 100644 index 000..aba5a56 --- /dev/null +++ b/external/icu/icu.changeset_36724.patch.1 @@ -0,0 +1,37 @@ +diff -ru2 icu/source/i18n/regexcmp.cpp icu/source/i18n/regexcmp.cpp +--- icu/source/i18n/regexcmp.cpp 2013-10-04 22:48:42.0 +0200 icu/source/i18n/regexcmp.cpp 2015-04-10 17:59:24.568227804 +0200 +@@ -2134,4 +2134,8 @@ + int32_t minML= minMatchLength(fMatchOpenParen, patEnd); + int32_t maxML= maxMatchLength(fMatchOpenParen, patEnd); ++if (URX_TYPE(maxML) != 0) { ++error(U_REGEX_LOOK_BEHIND_LIMIT); ++break; ++} + if (maxML == INT32_MAX) { + error(U_REGEX_LOOK_BEHIND_LIMIT); +@@ -2167,4 +2171,8 @@ + int32_t minML= minMatchLength(fMatchOpenParen, patEnd); + int32_t maxML= maxMatchLength(fMatchOpenParen, patEnd); ++if (URX_TYPE(maxML) != 0) { ++error(U_REGEX_LOOK_BEHIND_LIMIT); ++break; ++} + if (maxML == INT32_MAX) { + error(U_REGEX_LOOK_BEHIND_LIMIT); +diff -ru2 icu/source/test/testdata/regextst.txt icu/source/test/testdata/regextst.txt +--- icu/source/test/testdata/regextst.txt 2013-10-04 22:48:12.0 +0200 icu/source/test/testdata/regextst.txt 2015-04-10 18:00:41.254717186 +0200 +@@ -1174,4 +1174,12 @@ + + ++# Bug 11370 ++# Max match length computation of look-behind expression gives result that is too big to fit in the ++# in the 24 bit operand portion of the compiled code. Expressions should fail to compile ++# (Look-behind match length must be bounded. This case is treated as unbounded, an error.) ++ ++(?!(0123456789a){1000})x E no match ++(?!\\ubeaf(\\ubeaf{11000}){11000}) E no match ++ + # Random debugging, Temporary + # diff --git a/external/icu/icu.changeset_36727.patch.1 b/external/icu/icu.changeset_36727.patch.1 new file mode 100644 index 000..567a532 --- /dev/null +++ b/external/icu/icu.changeset_36727.patch.1 @@ -0,0 +1,52 @@ +diff -ru2 1.icu/source/i18n/regexcmp.cpp 2.icu/source/i18n/regexcmp.cpp +--- 1.icu/source/i18n/regexcmp.cpp 2015-04-10 18:07:53.410434700 +0200 2.icu/source/i18n/regexcmp.cpp 2015-04-10 18:08:23.356622663 +0200 +@@ -2338,5 +2338,13 @@ + if (fIntervalUpper == 0) { + // Pathological case. Attempt no matches, as if the block doesn't exist. ++// Discard the generated code for the block. ++// If the block included parens, discard the info pertaining to them as well. + fRXPat-fCompiledPat-setSize(topOfBlock); ++if (fMatchOpenParen = topOfBlock) { ++fMatchOpenParen = -1; ++} ++if (fMatchCloseParen = topOfBlock) { ++fMatchCloseParen = -1; ++} + return TRUE; + } +diff -ru2 1.icu/source/i18n/regexcmp.h 2.icu/source/i18n/regexcmp.h +--- 1.icu/source/i18n/regexcmp.h 2013-10-04 22:48:44.0 +0200 2.icu/source/i18n/regexcmp.h 2015-04-10 18:08:23.356622663 +0200 +@@ -183,5 +183,7 @@ + // of the slot reserved for a state save + // at the start of the most recently processed +- // parenthesized block. ++
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - external/icu
external/icu/UnpackedTarball_icu.mk |1 + external/icu/icu4c-icu11451.patch.1 | 11 +++ 2 files changed, 12 insertions(+) New commits: commit 915153b2e14dd75a6c90f5f4b1ac01b7f47bafdb Author: Caolán McNamara caol...@redhat.com Date: Fri Dec 19 10:40:02 2014 + icu#11451 bidi, the gift that keeps on giving Change-Id: I3bd37f8468c95a29ab3385dbc3ae825b76d8d3df (cherry picked from commit bfb9eb550c4facb9aa6346a8d19f015cf5182668) diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index d541e2e..af9c751 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-icu11100.patch.1 \ external/icu/icu4c-icu11131.patch.1 \ external/icu/icu4c-scriptrun.patch \ + external/icu/icu4c-icu11451.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/icu/icu4c-icu11451.patch.1 b/external/icu/icu4c-icu11451.patch.1 new file mode 100644 index 000..b15185a --- /dev/null +++ b/external/icu/icu4c-icu11451.patch.1 @@ -0,0 +1,11 @@ +--- icu/source/common/ubidi.c.orig 2014-12-19 10:23:38.103928414 + icu/source/common/ubidi.c 2014-12-19 10:26:58.370071527 + +@@ -2146,7 +2146,7 @@ + /* The isolates[] entries contain enough information to +resume the bidi algorithm in the same state as it was +when it was interrupted by an isolate sequence. */ +-if(dirProps[start]==PDI) { ++if(dirProps[start]==PDI pBiDi-isolateCount = 0) { + levState.startON=pBiDi-isolates[pBiDi-isolateCount].startON; + start1=pBiDi-isolates[pBiDi-isolateCount].start1; + stateImp=pBiDi-isolates[pBiDi-isolateCount].stateImp; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - external/icu
external/icu/UnpackedTarball_icu.mk |1 external/icu/icu4c-scriptrun.patch | 58 2 files changed, 59 insertions(+) New commits: commit bff0fe902686d8c126a73e1d2c914f5d65c6ffaf Author: Caolán McNamara caol...@redhat.com Date: Sun Nov 30 20:38:42 2014 + mirror fixes for fdo#78906 and deb#766788 into icu Change-Id: I9325bb28eb267b023f628e24fea216ad580759e9 (cherry picked from commit a66451887425ddd9387e2b25d5125916f4a35f83) diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index 0f6ecd1..d541e2e 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-icu11054.patch.1 \ external/icu/icu4c-icu11100.patch.1 \ external/icu/icu4c-icu11131.patch.1 \ + external/icu/icu4c-scriptrun.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/icu/icu4c-scriptrun.patch b/external/icu/icu4c-scriptrun.patch new file mode 100644 index 000..e307811 --- /dev/null +++ b/external/icu/icu4c-scriptrun.patch @@ -0,0 +1,58 @@ +--- misc/icu/source/extra/scrptrun/scrptrun.cpp misc/build/icu/source/extra/scrptrun/scrptrun.cpp +@@ -150,7 +150,11 @@ + // characters above it on the stack will be poped. + if (pairIndex = 0) { + if ((pairIndex 1) == 0) { +-parenStack[++parenSP].pairIndex = pairIndex; ++++parenSP; ++int32_t nVecSize = parenStack.size(); ++if (parenSP == nVecSize) ++parenStack.resize(nVecSize + 128); ++parenStack[parenSP].pairIndex = pairIndex; + parenStack[parenSP].scriptCode = scriptCode; + } else if (parenSP = 0) { + int32_t pi = pairIndex ~1; +@@ -184,7 +188,14 @@ + // pop it from the stack + if (pairIndex = 0 (pairIndex 1) != 0 parenSP = 0) { + parenSP -= 1; +-startSP -= 1; ++/* decrement startSP only if it is = 0, ++ decrementing it unnecessarily will lead to memory corruption ++ while processing the above while block. ++ e.g. startSP = -4 , parenSP = -1 ++*/ ++if (startSP = 0) { ++startSP -= 1; ++} + } + } else { + // if the run broke on a surrogate pair, +--- misc/icu/source/extra/scrptrun/scrptrun.h misc/build/icu/source/extra/scrptrun/scrptrun.h +@@ -17,6 +17,7 @@ + #include unicode/utypes.h + #include unicode/uobject.h + #include unicode/uscript.h ++#include vector + + struct ScriptRecord + { +@@ -79,7 +80,7 @@ + int32_t scriptEnd; + UScriptCode scriptCode; + +-ParenStackEntry parenStack[128]; ++std::vectorParenStackEntry parenStack; + int32_t parenSP; + + static int8_t highBit(int32_t value); +@@ -133,6 +134,7 @@ + scriptEnd = charStart; + scriptCode = USCRIPT_INVALID_CODE; + parenSP = -1; ++parenStack.resize(128); + } + + inline void ScriptRun::reset(int32_t start, int32_t length) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits