head 1.1; access; symbols pkgsrc-2026Q3:1.1.0.2 pkgsrc-2026Q3-base:1.1; locks; strict; comment @# @; 1.1 date 2026.09.19.19.18.02; author wiz; state Exp; branches; next ; commitid n3nlgo6uErqdygWG; desc @@ 1.1 log @perl: fix CVE-2026-82560 using upstream patch Bump PKGREVISION. ok bsiegert@@ @ text @$NetBSD$ From 70510174f69eb54aa6d617bde4e1402cd9b7c61f Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 29 Aug 2026 10:29:37 -0700 Subject: [PATCH] Handle pathological margins in Pod::Text If the margin equals or exceeds the output width, Pod::Text and its subclasses could hang forever in the wrapping regular expression, since it would successfully match zero characters. Catch this case, report an error, and force the margin to zero. --- cpan/podlators/lib/Pod/Text/Termcap.pm.orig 2026-05-14 00:58:29.000000000 +0000 +++ cpan/podlators/lib/Pod/Text/Termcap.pm @@@@ -147,6 +147,15 @@@@ sub wrap { return $self->SUPER::wrap($_); } + # Pathological margins make wrapping impossible. In this case, complain to + # the user and reset the margin to 0. + if ($width <= 0) { + my $error = 'Margin is wider than the output width'; + $self->whine($self->line_count(), $error); + $spaces = q{}; + $width = $self->{opt_width}; + } + # $code matches a single special sequence. $char matches any number of # special sequences preceding a single character other than a newline. # $shortchar matches some sequence of $char ending in codes followed by @@@@ -263,7 +272,7 @@@@ Copyright 1999, 2001-2002, 2004, 2006, 2008-2009, 2014 =head1 COPYRIGHT AND LICENSE Copyright 1999, 2001-2002, 2004, 2006, 2008-2009, 2014-2015, 2018-2019, 2022, -2024 Russ Allbery +2024, 2026 Russ Allbery This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. @