File icu-CVE-2025-5222-shim05_7496867.patch of Package icu
From 749686765127fb7aec0a3eb655cddab5a864500e Mon Sep 17 00:00:00 2001
From: Markus Scherer <markus.icu@gmail.com>
Date: Fri, 26 Jul 2013 21:23:28 +0000
Subject: [PATCH] ICU-9101 build all source/data/coll/ tailorings, except
search, with new CollationBuilder
X-SVN-Rev: 33993
---
source/i18n/collationrootelements.h | 1 +
source/i18n/collationruleparser.cpp | 5 +-
source/i18n/collationtailoring.h | 2 +
source/test/testdata/collationtest.txt | 1 +
source/tools/genrb/parse.cpp | 80 ++++++++++++++++++++++++--
5 files changed, 82 insertions(+), 7 deletions(-)
--- a/source/tools/genrb/parse.cpp
+++ b/source/tools/genrb/parse.cpp
@@ -829,7 +829,8 @@
}
static struct SResource *
-addCollation(ParseState* state, struct SResource *result, uint32_t startline, UErrorCode *status)
+addCollation(ParseState* state, struct SResource *result, const char *collationType,
+ uint32_t startline, UErrorCode *status)
{
struct SResource *member = NULL;
struct UString *tokenValue;
@@ -989,10 +990,11 @@
escape(parseError.preContext, preBuffer);
escape(parseError.postContext, postBuffer);
warning(line,
- "%%%%CollationBin could not be constructed from CollationElements\n"
+ "%%%%CollationBin could not be constructed from %s/Sequence\n"
" check context, check that the FractionalUCA.txt UCA version "
"matches the current UCD version\n"
- " UErrorCode=%s UParseError={ line=%d offset=%d pre=<> post=<> }",
+ " UErrorCode=%s UParseError={ line=%d offset=%d pre=<%s> post=<%s> }",
+ collationType,
u_errorName(intStatus),
parseError.line,
parseError.offset,
@@ -1051,7 +1053,7 @@
printf(" collation elements %s at line %i \n", (tag == NULL) ? "(null)" : tag, (int)startline);
}
if(!newCollation) {
- return addCollation(state, result, startline, status);
+ return addCollation(state, result, "(no type)", startline, status);
}
else {
for(;;) {
@@ -1109,7 +1111,7 @@
if(token == TOK_OPEN_BRACE) {
token = getToken(state, &tokenValue, &comment, &line, status);
collationRes = table_open(state->bundle, subtag, NULL, status);
- collationRes = addCollation(state, collationRes, startline, status); /* need to parse the collation data regardless */
+ collationRes = addCollation(state, collationRes, subtag, startline, status); /* need to parse the collation data regardless */
if (gIncludeUnihanColl || uprv_strcmp(subtag, "unihan") != 0) {
table_add(result, collationRes, startline, status);
}