From 7058d05758834a6cdba461caf50f1cd0b9d22554 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Wed, 28 Apr 2010 02:32:00 +0000 Subject: [PATCH] ICU-7651 Fix incorrect size calculation of fSmallData in regex. X-SVN-Rev: 27992 --- icu4c/source/i18n/rematch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/i18n/rematch.cpp b/icu4c/source/i18n/rematch.cpp index 6baa66486c..92bad256de 100644 --- a/icu4c/source/i18n/rematch.cpp +++ b/icu4c/source/i18n/rematch.cpp @@ -243,7 +243,7 @@ void RegexMatcher::init2(UText *input, UErrorCode &status) { return; } - if (fPattern->fDataSize > (int32_t)(sizeof(fSmallData)/sizeof(int32_t))) { + if (fPattern->fDataSize > (int32_t)(sizeof(fSmallData)/sizeof(fSmallData[0]))) { fData = (int64_t *)uprv_malloc(fPattern->fDataSize * sizeof(int64_t)); if (fData == NULL) { status = fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;