Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 4d19b36932e18bce344d5db51a5fff31eb1cef20 https://github.com/Perl/perl5/commit/4d19b36932e18bce344d5db51a5fff31eb1cef20 Author: Tony Cook <t...@develop-help.com> Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths: M ext/PerlIO-via/t/via.t M ext/PerlIO-via/via.pm M ext/PerlIO-via/via.xs Log Message: ----------- PerlIO::via: sanity check READ method return value Coverity complained that the range of SvIV(result) could be large and well outside the bounds of the buffer at SvPVX(). So sanity check that the value of result is within range, if it is out of range warn and return an error. Also document the bottom of the range of expected return values from READ, -1 is less than $len and resulted in a crash. Ideally we'd just use the length of the modified $buffer to avoid such range errors, but the API is already designed, so we can't. CID 453853