Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven R. Loomis <srloomis@us.ibm.com>2018-10-17 19:43:52 +0300
committerMichaƫl Zasso <targos@protonmail.com>2018-10-26 13:06:55 +0300
commite5b51cc496803cc0f53128fdcf88f0260849d8b1 (patch)
treeb891490f9a6197aa3b73baf8a6329302936258bb /deps/icu-small/source/i18n/coll.cpp
parentc20eb4f2bdff962ffd947489ad91f5a3b5a498b6 (diff)
deps: icu 63.1 bump (CLDR 34)
- Full release notes: http://site.icu-project.org/download/63 Fixes: https://github.com/nodejs/node/issues/22344 PR-URL: https://github.com/nodejs/node/pull/23715 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/icu-small/source/i18n/coll.cpp')
-rw-r--r--deps/icu-small/source/i18n/coll.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/deps/icu-small/source/i18n/coll.cpp b/deps/icu-small/source/i18n/coll.cpp
index b7348a1d16f..2a614fac5dc 100644
--- a/deps/icu-small/source/i18n/coll.cpp
+++ b/deps/icu-small/source/i18n/coll.cpp
@@ -448,6 +448,13 @@ Collator* U_EXPORT2 Collator::createInstance(const Locale& desiredLocale,
#endif
{
coll = makeInstance(desiredLocale, status);
+ // Either returns NULL with U_FAILURE(status), or non-NULL with U_SUCCESS(status)
+ }
+ // The use of *coll in setAttributesFromKeywords can cause the NULL check to be
+ // optimized out of the delete even though setAttributesFromKeywords returns
+ // immediately if U_FAILURE(status), so we add a check here.
+ if (U_FAILURE(status)) {
+ return NULL;
}
setAttributesFromKeywords(desiredLocale, *coll, status);
if (U_FAILURE(status)) {
@@ -986,8 +993,8 @@ Collator::internalCompareUTF8(const char *left, int32_t leftLength,
return UCOL_EQUAL;
}
return compareUTF8(
- StringPiece(left, (leftLength < 0) ? uprv_strlen(left) : leftLength),
- StringPiece(right, (rightLength < 0) ? uprv_strlen(right) : rightLength),
+ StringPiece(left, (leftLength < 0) ? static_cast<int32_t>(uprv_strlen(left)) : leftLength),
+ StringPiece(right, (rightLength < 0) ? static_cast<int32_t>(uprv_strlen(right)) : rightLength),
errorCode);
}