2 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4 Add NULL checks to getBuffer calls
5 https://unicode-org.atlassian.net/browse/ICU-12378
7 --- icu/source/common/uts46.cpp.orig
8 +++ icu/source/common/uts46.cpp
10 UBool disallowNonLDHDot=(options&UIDNA_USE_STD3_RULES)!=0;
13 - const char16_t *label=dest.getBuffer()+labelStart;
14 + const char16_t *l=dest.getBuffer();
16 + info.labelErrors|=UIDNA_ERROR_LABEL_TOO_LONG;
19 + const char16_t *label=l+labelStart;
20 const char16_t *limit=label+labelLength;
21 // Start after the initial "xn--".
22 // Ok to cast away const because we own the UnicodeString.