Convert.FromHexString returning an OperationStatus throws unless destination buffer is precisely sized #105405
Labels
area-System.Runtime
blocking-release
bug
in-pr
There is an active PR which will close this issue when it is merged
Milestone
Description
Convert.FromHexString
that returns anOperationStatus
will throw ifdestination
is larger than needed.Reproduction Steps
Expected behavior
The hex string decode successfully. The
bytesWritten
output value should be 3.Actual behavior
Regression?
No, this is a new API in .NET 9.
Known Workarounds
Slice the destination buffer to the required size.
Configuration
Other information
A debug build of the runtime fails for me hitting this assert:
runtime/src/libraries/Common/src/System/HexConverter.cs
Line 334 in c72aa98
The text was updated successfully, but these errors were encountered: