From 94de212563f9aca2f7a80d6610ed1e69457671ac Mon Sep 17 00:00:00 2001 From: Alan Liu Date: Thu, 5 Jun 2003 17:26:12 +0000 Subject: [PATCH] ICU-2974 disallow new X[0] X-SVN-Rev: 12315 --- icu4c/source/i18n/timezone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/i18n/timezone.cpp b/icu4c/source/i18n/timezone.cpp index e3563ee350..54b5fe980f 100644 --- a/icu4c/source/i18n/timezone.cpp +++ b/icu4c/source/i18n/timezone.cpp @@ -162,7 +162,7 @@ static UBool loadZoneData() { // Construct the available IDs array. The ordering // of this array conforms to the ordering of the // index by name table. - UnicodeString* zone_ids = new UnicodeString[tzh->count]; + UnicodeString* zone_ids = new UnicodeString[tzh->count ? tzh->count : 1]; if (zone_ids == 0) { udata_close(udata); return FALSE;