-
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
Fix overflow check for parsing format strings #72647
Conversation
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsFixes #67891 Limiting the precision to int.MaxValue ended up causing issues, so we are going to limit to Do we need to update this article, or any other documentation? https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
|
Yes, we should submit PRs to update the docs appropriately. |
Does runtime/src/libraries/Common/src/System/Globalization/FormatProvider.Number.cs Lines 703 to 716 in 746fc5f
|
@stephentoub yes, and probably this too https://source.dot.net/#System.Runtime.Numerics/System/Numerics/BigNumber.cs,858. I'll bundle those in. |
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Fixes #67891
Limiting the precision to int.MaxValue ended up causing issues, so we are going to limit to
999_999_999
(9 digits) instead. As discussed in the above issue, that should be more than enough precision for every type we support and plan to support.Do we need to update this article, or any other documentation? https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings