Obsolete golang-120
[oi-userland.git] / components / library / icu-75 / patches / 133-source-i18n-region.cpp.patch
blobeea3b728c747556324ea108db450f16f9cbcad98
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 @@ -510,6 +510,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);