From 4f666eebc4a2e8ef1f13a8a3bc6b8aec44c66a0c Mon Sep 17 00:00:00 2001 From: Debabrata Sengupta Date: Mon, 27 Aug 2012 18:50:29 +0000 Subject: [PATCH] ICU-9481 handled segmentation fault issue with uenum_next X-SVN-Rev: 32242 --- icu4c/source/common/uenum.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/icu4c/source/common/uenum.c b/icu4c/source/common/uenum.c index 549769c449d..9a3d9e14148 100644 --- a/icu4c/source/common/uenum.c +++ b/icu4c/source/common/uenum.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2002-2004, International Business Machines +* Copyright (C) 2002-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -160,7 +160,13 @@ uenum_next(UEnumeration* en, return NULL; } if (en->next != NULL) { - return en->next(en, resultLength, status); + if (resultLength != NULL) { + return en->next(en, resultLength, status); + } + else { + int32_t dummyLength=0; + return en->next(en, &dummyLength, status); + } } else { *status = U_UNSUPPORTED_ERROR; return NULL; -- 2.50.1