rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / library / icu-74 / patches / 133-source-i18n-region.cpp.patch
blobb7bfcaa2b1a0952313f23ff9e049a19af83f8e3b
2 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
4 prevent a null pointer dereference
6 --- icu/source/i18n/region.cpp.orig
7 +++ icu/source/i18n/region.cpp
8 @@ -514,6 +514,10 @@
10 if ( r->fType == URGN_DEPRECATED && r->preferredValues->size() == 1) {
11 StringEnumeration *pv = r->getPreferredValues(status);
12 + if ( U_FAILURE(status) ) {
13 + delete r;
14 + return nullptr;
15 + }
16 pv->reset(status);
17 const UnicodeString *ustr = pv->snext(status);
18 r = (Region *)uhash_get(regionIDMap,(void *)ustr);