[release/3.0] Fix BinaryReader.ReadChars for fragmented Streams (#26324) (#26356)
authorJan Kotas <jkotas@microsoft.com>
Mon, 26 Aug 2019 15:04:09 +0000 (08:04 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2019 15:04:09 +0000 (08:04 -0700)
commit654cd7e0d39c16fe3adec6f67a27eb3b1304c35d
tree8a52c9e551044c8ce053cd538d1c703eb4851632
parent795458a84583d81a9f9e6952fc47fcfc9e58e73c
[release/3.0] Fix BinaryReader.ReadChars for fragmented Streams (#26324) (#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
src/System.Private.CoreLib/shared/System/IO/BinaryReader.cs
src/System.Private.CoreLib/shared/System/Text/DecoderNLS.cs