From: Debabrata Sengupta Date: Mon, 27 Aug 2012 18:50:29 +0000 (+0000) Subject: ICU-9481 handled segmentation fault issue with uenum_next X-Git-Tag: milestone-59-0-1~3639 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f666eebc4a2e8ef1f13a8a3bc6b8aec44c66a0c;p=icu ICU-9481 handled segmentation fault issue with uenum_next X-SVN-Rev: 32242 --- 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;