X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b331163bffd790ced0e88b73f44f86d49ccc48a5..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/common/caniter.cpp?ds=sidebyside diff --git a/icuSources/common/caniter.cpp b/icuSources/common/caniter.cpp index ad09940d..58b37818 100644 --- a/icuSources/common/caniter.cpp +++ b/icuSources/common/caniter.cpp @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 1996-2014, International Business Machines Corporation and + * Copyright (C) 1996-2015, International Business Machines Corporation and * others. All Rights Reserved. ***************************************************************************** */ @@ -508,6 +508,13 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con int32_t inputLen=temp.length(); UnicodeString decompString; nfd.normalize(temp, decompString, status); + if (U_FAILURE(status)) { + return NULL; + } + if (decompString.isBogus()) { + status = U_MEMORY_ALLOCATION_ERROR; + return NULL; + } const UChar *decomp=decompString.getBuffer(); int32_t decompLen=decompString.length();