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

Unified Diff: source/common/utrie.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. 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 | « source/common/utrie.h ('k') | source/common/utrie2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/utrie.cpp
diff --git a/source/common/utrie.cpp b/source/common/utrie.cpp
index b8caeb722b30586bcc51d7459fec737e085b4d3f..478560df66eb3bf316e69bdc10fc4df4986f42b0 100644
--- a/source/common/utrie.cpp
+++ b/source/common/utrie.cpp
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
@@ -139,7 +141,7 @@ utrie_clone(UNewTrie *fillIn, const UNewTrie *other, uint32_t *aliasData, int32_
uprv_free(aliasData);
} else {
uprv_memcpy(trie->index, other->index, sizeof(trie->index));
- uprv_memcpy(trie->data, other->data, other->dataLength*4);
+ uprv_memcpy(trie->data, other->data, (size_t)other->dataLength*4);
trie->dataLength=other->dataLength;
trie->isDataAllocated=isDataAllocated;
}
@@ -839,7 +841,7 @@ utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity,
}
/* write 32-bit data values */
- uprv_memcpy(dest16, trie->data, 4*trie->dataLength);
+ uprv_memcpy(dest16, trie->data, 4*(size_t)trie->dataLength);
}
return length;
« no previous file with comments | « source/common/utrie.h ('k') | source/common/utrie2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698