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 = *((const StringResource **)l);
11 const StringResource *right = *((const StringResource **)r);
12 const UChar *lStart = left->getBuffer();
13 + if ( lStart == NULL ) {
14 + fprintf(stderr, "Could not allocate memory!!");
15 + exit(U_MEMORY_ALLOCATION_ERROR);
17 const UChar *lLimit = lStart + left->length();
18 const UChar *rStart = right->getBuffer();
19 + if ( rStart == NULL ) {
20 + fprintf(stderr, "Could not allocate memory!!");
21 + exit(U_MEMORY_ALLOCATION_ERROR);
23 const UChar *rLimit = rStart + right->length();
25 /* compare keys in reverse character order */