# # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # getBuffer handling is tracked upstream as https://unicode-org.atlassian.net/browse/ICU-12378 --- icu/source/common/caniter.cpp.orig +++ icu/source/common/caniter.cpp @@ -518,6 +518,10 @@ return nullptr; } const char16_t *decomp=decompString.getBuffer(); + if (decomp == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } int32_t decompLen=decompString.length(); // See if it matches the start of segment (at segmentPos)