Index | Thread | Search

From:
Marc Espie <marc.espie.openbsd@gmail.com>
Subject:
resend: turn IO::Uncompress::Gunzip "strict" mode on
To:
tech@openbsd.org
Cc:
afresh1@openbsd.org, tb@openbsd.org
Date:
Tue, 10 Nov 2026 18:39:34 +0100

Download raw body.

Thread
This is the very small patch that doesn't require a new version of 
IO::Compress

I've already sent it a few weeks ago, 

IO::Uncompress::Gunzip(3p) is self-explanatory.

Index: PackageRepository.pm
===================================================================
RCS file: /build/data/openbsd/cvs/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm,v
diff -u -p -r1.179 PackageRepository.pm
--- PackageRepository.pm	24 Sep 2026 10:46:55 -0000	1.179
+++ PackageRepository.pm	10 Nov 2026 17:37:24 -0000
@@ -400,7 +400,9 @@ sub did_it_fork($self, $pid)
 sub uncompress($self, $object, @p)
 {
 	require IO::Uncompress::Gunzip;
-	my $fh = IO::Uncompress::Gunzip->new(@p, MultiStream => 1);
+	my $fh = IO::Uncompress::Gunzip->new(@p, 
+	    MultiStream => 1,
+	    Strict => 1);
 	my $result = "";
 	if ($object->{is_signed}) {
 		my $h = $fh->getHeaderInfo;