openjdk-23: use OpenJDK 23 as the boot JDK
[oi-userland.git] / components / library / icu-72 / patches / 137-source-tools-genrb-reslist.cpp.patch
blobadb68207f3a0776e04034ca18099511ac32a42fc
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 UChar *lStart = left->getBuffer();
13 + if ( lStart == NULL ) {
14 + fprintf(stderr, "Could not allocate memory!!");
15 + exit(U_MEMORY_ALLOCATION_ERROR);
16 + }
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);
22 + }
23 const UChar *rLimit = rStart + right->length();
24 int32_t diff;
25 /* compare keys in reverse character order */