Skip to content
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-23002 Fix int64_t overflow in NFRule::parseRuleDescriptor #3324

Merged

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Jan 3, 2025

NFRule::parseRuleDescriptor need to check not overflowing the int64_t range before performing * 10 + digit.

Add unit test based on test data on https://g-issues.oss-fuzz.com/issues/385224936

Checklist

  • Required: Issue filed: ICU-23002
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@FrankYFTang FrankYFTang requested a review from richgillam January 3, 2025 09:59
Copy link
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also check Java

icu4c/source/i18n/nfrule.cpp Outdated Show resolved Hide resolved
icu4c/source/i18n/nfrule.cpp Outdated Show resolved Hide resolved
icu4c/source/test/intltest/itrbnf.cpp Outdated Show resolved Hide resolved
@FrankYFTang FrankYFTang requested a review from markusicu January 3, 2025 18:48
@FrankYFTang
Copy link
Contributor Author

PTAL

@FrankYFTang FrankYFTang force-pushed the ICU-23002-parseRuleDescriptor branch from 03a0fce to c57766a Compare January 3, 2025 23:03
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@FrankYFTang FrankYFTang merged commit 93ce388 into unicode-org:main Jan 3, 2025
101 checks passed
@FrankYFTang FrankYFTang deleted the ICU-23002-parseRuleDescriptor branch January 3, 2025 23:48
@richgillam
Copy link
Contributor

Back from vacation. Belated LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants