-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't clobber file bytes in :encoding layer
The PerlIO::encoding layer, when used on input, was creating an SvLEN==0 scalar pointing into the byte buffer, to pass to the ->decode method of the encoding object. Since the method mutates this scalar, for some encodings this led to mutating the byte buffer, and depending on where it came from that might be something visible elsewhere that should not be mutated. Remove the code for the SvLEN==0 scalar, instead always using the alternate code that would copy the bytes into a separate buffer owned by the scalar. Fixes [perl #132833].
- Loading branch information
Zefram
committed
Feb 16, 2018
1 parent
4bd1355
commit fed9fe5
Showing
3 changed files
with
22 additions
and
35 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