-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/9.0] Fix length check for Convert.TryToHexString{Lower} #110228
[release/9.0] Fix length check for Convert.TryToHexString{Lower} #110228
Conversation
Tagging subscribers to this area: @dotnet/area-system-runtime |
The size of destination should not be less than double source's length. Fix #109807
84a732f
to
3ba2b3a
Compare
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.
Yay, 2 files once again after the force push. I assume I can merge it now @GrabYourPitchforks ?
Edit: Let's wait for the CI to finish, there's still time.
Rebased the current PR on release/9.0 per discussion with servicing team. |
@carlossanlop Let's wait for CI to finish first. (Or at least to get most of the way through so we have good confidence we didn't break anything.) |
@carlossanlop CI failures are unrelated. Feel free to merge! |
Backport of #109891 to release/9.0-staging
/cc @adamsitnik @universorum
Customer Impact
The customers can't use the new
Convert.TryToHexString{Lower}
methods that got added in .NET 9, as due to an invalid condition (>
swapped with<
), we were rejecting buffers that were large enough to be able to store the results.Regression
No, both overloads got added in .NET 9.
Testing
The issue was missed because the overload seemed simple enough to not require any new tests.
The fix contains a nice set of unit tests that exercise both happy and unhappy code paths.
Risk
I can't see any risks, it's a very, very simple fix.