From d8450849661c24cc8e20b4e27043da399493c4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kaz=C3=A8de=20king?= Date: Wed, 2 Mar 2016 23:49:30 +0000 Subject: [PATCH] ICU-11872 fix invalid memory read X-SVN-Rev: 38467 --- icu4c/source/i18n/dtptngen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index b505b84c0a8..d3ecf24f155 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp @@ -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; } }