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/unisetspan.cpp.orig
8 +++ icu/source/common/unisetspan.cpp
11 const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
12 const char16_t *s16=string.getBuffer();
15 int32_t length16=string.length();
20 const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
21 const char16_t *s16=string.getBuffer();
24 int32_t length16=string.length();
26 if(length16<=rest && matches16CPB(s, pos, length, s16, length16)) {
29 const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
30 const char16_t *s16=string.getBuffer();
33 int32_t length16=string.length();
35 if(length16<=pos && matches16CPB(s, pos-length16, length, s16, length16)) {