Skip to content

Commit

Permalink
ICU-22549 Fix incorrect pointer
Browse files Browse the repository at this point in the history
Remove the adjustment of data pointer to avoid buffer-overflow
Fix bug https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65632
  • Loading branch information
FrankYFTang committed Jan 10, 2024
1 parent 906093f commit 23d1fc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions icu4c/source/test/fuzzer/collator_compare_fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
}
std::unique_ptr<char16_t[]> compbuff1(new char16_t[size/4]);
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/4)*2);
std::memcpy(compbuff2.get(), data + size/2, (size/4)*2);


icu::LocalPointer<icu::Collator> fuzzCollator(
Expand Down

0 comments on commit 23d1fc5

Please sign in to comment.