Skip Menu |

This queue is for tickets about the File-PCAP CPAN distribution.

Report information
The Basics
Id: 128720
Status: resolved
Worked: 30 min
Priority: 0/
Queue: File-PCAP

People
Owner: mamawe [...] cpan.org
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: v0.0.7
Fixed in: v0.1.0



Subject: File::PCAP::Reader doesn't set binmode for files
On MSWindows platforms, this results in the binary packet data not being read correctly and leads to parse/decode failure.  I've attached a patch for the problem against the v0.0.7 release.
Subject: diff-Naur-Reader_pm.patch
--- lib/File/PCAP/Reader.pm 2018-05-03 16:04:26.000000000 -0400 +++ lib/File/PCAP/Reader.pm 2019-03-03 13:30:45.616173700 -0500 @@ -205,6 +205,7 @@ my $fname = $self->{fname}; if ($fname) { if (open(my $fh, '<', $fname)) { + binmode $fh; $self->{fh} = $fh; $self->_read_pcap_global_header(); }
This problem affects File::PCAP::Writer too. I'll look at it as soon as I find some time.
This problem affects File::PCAP::Writer too. I'll look at it as soon as I find some time.
Am Mi 06. Mär 2019, 02:54:43, MAMAWE schrieb: Show quoted text
> This problem affects File::PCAP::Writer too. > > I'll look at it as soon as I find some time.
No, while looking through Writer.pm I saw that I had already set binmode there. The problem is fixed in v0.1.0.