Index: source/common/ubidi.c |
diff --git a/source/common/ubidi.c b/source/common/ubidi.c |
index c43c41c994a5b9b117432509a5661e839a741549..3c9497862639ba70fad44c4449c281540fb12cfa 100644 |
--- a/source/common/ubidi.c |
+++ b/source/common/ubidi.c |
@@ -1,3 +1,5 @@ |
+// Copyright (C) 2016 and later: Unicode, Inc. and others. |
+// License & terms of use: http://www.unicode.org/copyright.html |
/* |
****************************************************************************** |
* |
@@ -2383,7 +2385,7 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length, |
* direction is not MIXED |
*/ |
levels=ubidi_getLevels(pBiDi, pErrorCode); |
- uprv_memcpy(saveLevels, levels, pBiDi->length*sizeof(UBiDiLevel)); |
+ uprv_memcpy(saveLevels, levels, (size_t)pBiDi->length*sizeof(UBiDiLevel)); |
saveTrailingWSStart=pBiDi->trailingWSStart; |
saveLength=pBiDi->length; |
saveDirection=pBiDi->direction; |
@@ -2512,7 +2514,7 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length, |
if(saveLength>pBiDi->levelsSize) { |
saveLength=pBiDi->levelsSize; |
} |
- uprv_memcpy(pBiDi->levels, saveLevels, saveLength*sizeof(UBiDiLevel)); |
+ uprv_memcpy(pBiDi->levels, saveLevels, (size_t)saveLength*sizeof(UBiDiLevel)); |
pBiDi->trailingWSStart=saveTrailingWSStart; |
if(pBiDi->runCount>1) { |
pBiDi->direction=UBIDI_MIXED; |