iemejia commented on code in PR #3864:
URL: https://github.com/apache/avro/pull/3864#discussion_r3565728645
##########
lang/perl/lib/Avro/BinaryDecoder.pm:
##########
@@ -124,6 +124,10 @@ sub skip_bytes {
my $class = shift;
my $reader = pop;
my $size = decode_long($class, undef, undef, $reader);
+ if ($size < 0) {
+ throw Avro::Schema::Error::Parse(
+ "Invalid negative bytes/string length: $size");
+ }
$reader->seek($size, 0);
Review Comment:
Fixed in 9a4cf0a26b: skip_bytes() now uses whence 1 (SEEK_CUR) to skip
forward relative to the current position, instead of whence 0 (SEEK_SET) which
seeks to the absolute offset.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]