Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: src/runtime/runtime-i18n.cc

Issue 1645223003: Fix Unicode string normalization with null bytes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4654.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-i18n.cc
diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc
index e1f0c8e959f523c81f134cd2fe17742ec1b01a39..e57f8d3626e2b7baeaf6d16bf395b7d952486b01 100644
--- a/src/runtime/runtime-i18n.cc
+++ b/src/runtime/runtime-i18n.cc
@@ -586,8 +586,9 @@ RUNTIME_FUNCTION(Runtime_StringNormalize) {
// TODO(mnita): check Normalizer2 (not available in ICU 46)
UErrorCode status = U_ZERO_ERROR;
+ icu::UnicodeString input(false, u_value, string_value.length());
icu::UnicodeString result;
- icu::Normalizer::normalize(u_value, normalizationForms[form_id], 0, result,
+ icu::Normalizer::normalize(input, normalizationForms[form_id], 0, result,
status);
if (U_FAILURE(status)) {
return isolate->heap()->undefined_value();
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4654.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698