mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 17:01:16 +00:00
ICU-11872 fix invalid memory read
X-SVN-Rev: 38467
This commit is contained in:
parent
4a45deb1ac
commit
d845084966
1 changed files with 1 additions and 1 deletions
|
@ -457,13 +457,13 @@ struct AllowedHourFormatsSink : public ResourceTableSink {
|
|||
|
||||
if (uprv_strcmp(key, "allowed") == 0) {
|
||||
outer.allowedFormats = new int32_t[2];
|
||||
outer.allowedFormatsLength = 1;
|
||||
if (outer.allowedFormats == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
outer.allowedFormats[0] = outer.getHourFormatFromUnicodeString(
|
||||
value.getUnicodeString(status));
|
||||
outer.allowedFormats[1] = ALLOWED_HOUR_FORMAT_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue