Files
gentoo/dev-perl/HTTP-Daemon/files/HTTP-Daemon-6.160.0-CVE-2026-8450.patch
Brett A C Sheffield 053756a224 dev-perl/HTTP-Daemon: fix CVE-2026-8450
- backport fix for CVE-2026-8450
- Remove unversioned perl virtuals (MissingVersionedVirtualPerlDependency)
- Remove blocker for dev-perl/libwww-perl-6 (NonexistentBlocker)

Bug: https://bugs.gentoo.org/976110
Signed-off-by: Brett A C Sheffield <bacs@librecast.net>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1033
Merges: https://codeberg.org/gentoo/gentoo/pulls/1033
Signed-off-by: Sam James <sam@gentoo.org>
2026-09-11 01:15:34 +01:00

33 lines
926 B
Diff

https://bugs.gentoo.org/976110
https://www.openwall.com/lists/oss-security/2026/05/27/5
From: Stig Palmquist <stig@stig.io>
--- a/lib/HTTP/Daemon.pm
+++ b/lib/HTTP/Daemon.pm
@@ -598,11 +598,10 @@ sub send_dir {
sub send_file {
my ($self, $file) = @_;
my $opened = 0;
- local (*FILE);
if (!ref($file)) {
- open(FILE, $file) || return undef;
- binmode(FILE);
- $file = \*FILE;
+ open(my $fh, '<', $file) || return undef;
+ binmode($fh) || do { close($fh); return undef };
+ $file = $fh;
$opened++;
}
my $cnt = 0;
@@ -614,7 +613,11 @@ sub send_file {
print $self $buf;
}
close($file) if $opened;
- $cnt;
+
+ # Return a "true zero" for empty-but-successful copies so callers
+ # using `send_file or die` can distinguish open failure (undef)
+ # from a successful zero-byte transfer.
+ $cnt || '0E0';
}