ports/devel/icu/files/patch-r40670
Jan Beich 724622efb0 devel/icu: backport a few bugfixes
Obtained from:	upstream
Reported by:	Mozilla
2017-11-27 16:15:44 +00:00

46 lines
1.4 KiB
Text

--- i18n/calendar.cpp.orig 2017-10-11 16:24:34 UTC
+++ i18n/calendar.cpp
@@ -706,7 +706,9 @@ fTime(0),
fLenient(TRUE),
fZone(NULL),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
-fSkippedWallTime(UCAL_WALLTIME_LAST)
+fSkippedWallTime(UCAL_WALLTIME_LAST),
+validLocale(""),
+actualLocale("")
{
clear();
if (U_FAILURE(success)) {
@@ -732,7 +734,9 @@ fTime(0),
fLenient(TRUE),
fZone(NULL),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
-fSkippedWallTime(UCAL_WALLTIME_LAST)
+fSkippedWallTime(UCAL_WALLTIME_LAST),
+validLocale(""),
+actualLocale("")
{
if (U_FAILURE(success)) {
return;
@@ -764,7 +768,9 @@ fTime(0),
fLenient(TRUE),
fZone(NULL),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
-fSkippedWallTime(UCAL_WALLTIME_LAST)
+fSkippedWallTime(UCAL_WALLTIME_LAST),
+validLocale(""),
+actualLocale("")
{
if (U_FAILURE(success)) {
return;
@@ -822,8 +828,8 @@ Calendar::operator=(const Calendar &right)
fWeekendCease = right.fWeekendCease;
fWeekendCeaseMillis = right.fWeekendCeaseMillis;
fNextStamp = right.fNextStamp;
- uprv_strcpy(validLocale, right.validLocale);
- uprv_strcpy(actualLocale, right.actualLocale);
+ uprv_strncpy(validLocale, right.validLocale, sizeof(validLocale));
+ uprv_strncpy(actualLocale, right.actualLocale, sizeof(actualLocale));
}
return *this;