-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.IOhelp wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]
Milestone
Description
MemoryStream was recently fixed to avoid falling into a state where it could contain a negative Position
dotnet/runtime#88572.
Some API docs don't mention the origin
when they talk about ArgumentOutOfRangeException and only mention that the value must be between int.MaxValue and zero.
SetLength does correctly reflect that the limit accounts for the origin:
value is negative or is greater than the maximum length of the MemoryStream, where the maximum length is (Int32.MaxValue - origin), and origin is the index into the underlying buffer at which the stream starts.
We need to amend the former cases to align with SetLength's.
adamsitnik
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.IOhelp wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]