Chromium Code Reviews

Unified Diff: source/i18n/usearch.cpp

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « source/i18n/uregion.cpp ('k') | source/i18n/uspoof.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/usearch.cpp
diff --git a/source/i18n/usearch.cpp b/source/i18n/usearch.cpp
index 41639b6947de16c18c4f9d70e5c25f1104a3f1d5..4bb3fc403151caf7cd5cdec4a087599b1bfdce02 100644
--- a/source/i18n/usearch.cpp
+++ b/source/i18n/usearch.cpp
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
* Copyright (C) 2001-2015 IBM and others. All rights reserved.
@@ -222,7 +224,7 @@ inline int32_t * addTouint32_tArray(int32_t *destination,
if (U_FAILURE(*status)) {
return NULL;
}
- uprv_memcpy(temp, destination, sizeof(int32_t) * offset);
+ uprv_memcpy(temp, destination, sizeof(int32_t) * (size_t)offset);
*destinationlength = newlength;
destination = temp;
}
@@ -264,7 +266,7 @@ inline int64_t * addTouint64_tArray(int64_t *destination,
return NULL;
}
- uprv_memcpy(temp, destination, sizeof(int64_t) * offset);
+ uprv_memcpy(temp, destination, sizeof(int64_t) * (size_t)offset);
*destinationlength = newlength;
destination = temp;
}
@@ -1379,7 +1381,7 @@ inline UChar * addToUCharArray( UChar *destination,
}
}
if (source1length != 0) {
- uprv_memcpy(destination, source1, sizeof(UChar) * source1length);
+ u_memcpy(destination, source1, source1length);
}
if (source2length != 0) {
uprv_memcpy(destination + source1length, source2,
« no previous file with comments | « source/i18n/uregion.cpp ('k') | source/i18n/uspoof.cpp » ('j') | no next file with comments »

Powered by Google App Engine