-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICU-21041 Fix fuzzer memory read error. #1622
ICU-21041 Fix fuzzer memory read error. #1622
Conversation
@@ -261,6 +261,10 @@ DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode & | |||
return utrie2_get32(builder.trie, jamo); | |||
} else { | |||
ConditionalCE32 *cond = builder.getConditionalCE32ForCE32(ce32); | |||
if (cond == nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This whole function needs, as the very first thing, to check its incoming UErrorCode, and return immediately if failure.
- The fuzzer failure might disappear if this were done (but this would need to be verified)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that check, as
uint32_t
DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode) {
+ if (U_FAILURE(errorCode)) {
+ return 0;
+ }
U_ASSERT(Collation::hasCE32Tag(ce32, Collation::BUILDER_DATA_TAG));
but still have the problem
Ping |
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm pse squash
By the way, the .txt file is empty. Is that on purpose, just as a marker for the fuzzer system? |
The test case file is a UTF16 encoded file. I think github just does not like the fact I use the .txt extension and the content is in UTF16. Change the file extension to .case now. |
5404451
to
3fa6ab5
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
The copyright scanner is failing for the new file, but of course you can't add a copyright there. I propose that we use |
3fa6ab5
to
fb318fd
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
fb318fd
to
58aed6e
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm tnx
This change cherry-picks an upstream fix for a null-dereference error. Upstream ticket: https://unicode-org.atlassian.net/browse/ICU-21041 Upstream PR: unicode-org/icu#1622 Note: The upstream change modifies 3 files, but only 2 files are modified here as we don't include the .cpyskip.txt file in MS-ICU (used for syntax highlighting on GitHub).
Checklist