This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix BinaryReader.ReadChars for fragmented Streams #26324
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkotas
commented
Aug 22, 2019
@@ -217,7 +217,7 @@ public override unsafe int GetCharCount(byte* bytes, int count, bool flush) | |||
public bool MustFlush => _mustFlush; | |||
|
|||
// Anything left in our decoder? | |||
internal virtual bool HasState => false; | |||
internal virtual bool HasState => _leftoverByteCount != 0; |
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.
@GrabYourPitchforks Could you please review this part of the fix?
PR with CoreFX test will follow... |
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455
stephentoub
reviewed
Aug 23, 2019
stephentoub
approved these changes
Aug 24, 2019
jkotas
added a commit
to jkotas/coreclr
that referenced
this pull request
Aug 24, 2019
…et#26324) BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corefx
that referenced
this pull request
Aug 25, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corert
that referenced
this pull request
Aug 25, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/mono
that referenced
this pull request
Aug 25, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub
pushed a commit
to dotnet/corert
that referenced
this pull request
Aug 26, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
stephentoub
pushed a commit
to dotnet/corefx
that referenced
this pull request
Aug 26, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
akoeplinger
pushed a commit
to mono/mono
that referenced
this pull request
Aug 26, 2019
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas
added a commit
that referenced
this pull request
Aug 26, 2019
…) (#26356) BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks. Fixes https://github.com/dotnet/corefx/issues/40455 Commit migrated from dotnet/coreclr@4e8339f
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks.
Fixes https://github.com/dotnet/corefx/issues/40455