ICU-11809 Null terminate buffer in initCurrency
X-SVN-Rev: 38090
This commit is contained in:
parent
25f9110090
commit
257d5a0a27
@ -1222,6 +1222,7 @@ void MeasureUnit::initCurrency(const char *isoCurrency) {
|
||||
fSubTypeId = result - gOffsets[fTypeId];
|
||||
} else {
|
||||
uprv_strncpy(fCurrency, isoCurrency, UPRV_LENGTHOF(fCurrency));
|
||||
fCurrency[3] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,8 @@ NumberFormat::operator=(const NumberFormat& rhs)
|
||||
fMaxFractionDigits = rhs.fMaxFractionDigits;
|
||||
fMinFractionDigits = rhs.fMinFractionDigits;
|
||||
fParseIntegerOnly = rhs.fParseIntegerOnly;
|
||||
u_strncpy(fCurrency, rhs.fCurrency, 4);
|
||||
u_strncpy(fCurrency, rhs.fCurrency, 3);
|
||||
fCurrency[3] = 0;
|
||||
fLenient = rhs.fLenient;
|
||||
fCapitalizationContext = rhs.fCapitalizationContext;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user