#
# 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 NULL;
     }
     const UChar *decomp=decompString.getBuffer();
+    if ( decomp == NULL ) {
+        status = U_MEMORY_ALLOCATION_ERROR;
+        return NULL;
+    }
     int32_t decompLen=decompString.length();
 
     // See if it matches the start of segment (at segmentPos)