2 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
4 getBuffer handling is tracked upstream as
5 https://unicode-org.atlassian.net/browse/ICU-12378
7 --- icu/source/tools/genrb/reslist.cpp.orig
8 +++ icu/source/tools/genrb/reslist.cpp
10 const StringResource *left = *static_cast<const StringResource* const*>(l);
11 const StringResource *right = *static_cast<const StringResource* const*>(r);
12 const char16_t *lStart = left->getBuffer();
13 + if (lStart == nullptr) {
14 + fprintf(stderr, "Could not allocate memory!!");
15 + exit(U_MEMORY_ALLOCATION_ERROR);
17 const char16_t *lLimit = lStart + left->length();
18 const char16_t *rStart = right->getBuffer();
19 + if (rStart == nullptr) {
20 + fprintf(stderr, "Could not allocate memory!!");
21 + exit(U_MEMORY_ALLOCATION_ERROR);
23 const char16_t *rLimit = rStart + right->length();
25 /* compare keys in reverse character order */