Subject: | Invalid data length |
Date: | Tue, 5 Dec 2017 06:24:33 +0300 |
To: | bug-File-PCAP [...] rt.cpan.org |
From: | Konstantin Tokar <konstantin [...] tokar.ru> |
Original:
sub _read_pcap_global_header {
my ($self) = @_;
my $fh = $self->{fh};
my ($magic,$vmajor,$vminor,$tzone,$sigfigs,$snaplen,$dlt) =
unpack("LSSlLLL",<$fh>);
Patched:
sub _read_pcap_global_header {
my ($self) = @_;
my $fh = $self->{fh};
my $data;
read $fh, $data, 24;
my ($magic,$vmajor,$vminor,$tzone,$sigfigs,$snaplen,$dlt) =
unpack("LSSlLLL",$data);
Best regards
Konstantin Tokar