rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / library / icu-74 / patches / 137-source-tools-genrb-reslist.cpp.patch
bloba376d7ad69f8c20bf5e408f9b320b582daebafe9
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 @@ -1507,8 +1507,16 @@
10 const StringResource *left = *((const StringResource **)l);
11 const StringResource *right = *((const StringResource **)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 */