ICU-2436 correct off-by-one err in buffer calculation

X-SVN-Rev: 12206
This commit is contained in:
Steven R. Loomis 2003-05-30 22:51:23 +00:00
parent 7bb12547c1
commit 2318e332fd

View File

@ -546,7 +546,7 @@ DateFormatSymbols::getData(ResourceBundle &rb, const char *tag, const char *type
}
int32_t len = uprv_strlen(tag) + 1 + uprv_strlen(type); // tag + _ + type (i.e. Eras_Japanese )
if(len > sizeof(tmp)) {
if(len >= sizeof(tmp)) {
fullTag = (char*)uprv_malloc(len+1);
}