-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/unicode: correctly handle single-byte UTF-16 inputs (and har…
…den transform.String) If a single byte is passed to a UTF-16 decoder with atEOF set, it should not ask for more src with ErrShortSrc but return an error. Also harden transform.String not to enter an infinite loop if a Transformer does return ErrShortSrc with atEOF true. Fixes #39491 Fixes CVE-2020-14040 Change-Id: If8d2a9bca4eb9b4270c98a4967d356082043e17e Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/768667 Reviewed-by: Filippo Valsorda <[email protected]> Reviewed-on: https://go-review.googlesource.com/c/text/+/238238 Run-TryBot: Katie Hockman <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
- Loading branch information
1 parent
3a82255
commit 23ae387
Showing
4 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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