mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-20652 Corrects calculation of byte sequence length to prevent buffer
overflow. ICU-20652 Add parenthesis, improve readability.
This commit is contained in:
parent
6e5755a2a8
commit
c43455749b
1 changed files with 2 additions and 2 deletions
|
@ -17,10 +17,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
return 0;
|
||||
|
||||
std::unique_ptr<char16_t> compbuff1(new char16_t[size/4]);
|
||||
std::memcpy(compbuff1.get(), data, size/2);
|
||||
std::memcpy(compbuff1.get(), data, (size/4)*2);
|
||||
data = data + size/2;
|
||||
std::unique_ptr<char16_t> compbuff2(new char16_t[size/4]);
|
||||
std::memcpy(compbuff2.get(), data, size/2);
|
||||
std::memcpy(compbuff2.get(), data, (size/4)*2);
|
||||
|
||||
icu::LocalPointer<icu::Collator> fuzzCollator(
|
||||
icu::Collator::createInstance(icu::Locale::getUS(), status), status);
|
||||
|
|
Loading…
Add table
Reference in a new issue