json-glib: update to 1.10.6
[oi-userland.git] / components / library / icu / patches / 137-source-tools-genrb-reslist.cpp.patch
blobf88dac6d052b527c7cb629f0a9310de395ec686e
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
9 @@ -1509,8 +1509,16 @@
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);
16 + }
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);
22 + }
23 const char16_t *rLimit = rStart + right->length();
24 int32_t diff;
25 /* compare keys in reverse character order */