]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/reldtfmt.cpp
ICU-57149.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / reldtfmt.cpp
index 5856d3fe37cd55322b23390dc5f09ad9ab008c27..9e0f3a66f187475028c89c6ab913e5ca75c54fb0 100644 (file)
@@ -59,8 +59,8 @@ RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) :
         fCombinedFormat = new SimpleFormatter(*other.fCombinedFormat);
     }
     if (fDatesLen > 0) {
         fCombinedFormat = new SimpleFormatter(*other.fCombinedFormat);
     }
     if (fDatesLen > 0) {
-        fDates = (URelativeString*) uprv_malloc(sizeof(fDates[0])*fDatesLen);
-        uprv_memcpy(fDates, other.fDates, sizeof(fDates[0])*fDatesLen);
+        fDates = (URelativeString*) uprv_malloc(sizeof(fDates[0])*(size_t)fDatesLen);
+        uprv_memcpy(fDates, other.fDates, sizeof(fDates[0])*(size_t)fDatesLen);
     }
 #if !UCONFIG_NO_BREAK_ITERATION
     if (other.fCapitalizationBrkIter != NULL) {
     }
 #if !UCONFIG_NO_BREAK_ITERATION
     if (other.fCapitalizationBrkIter != NULL) {