From 8a62fc9064a7fffa9677c1e963b7975dc0d1fcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Mon, 11 Mar 2024 20:09:16 +0100 Subject: [PATCH] Avoid invalid ranges. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ortega Froysa --- pacundo.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacundo.pl b/pacundo.pl index 2be4693..bf4663d 100755 --- a/pacundo.pl +++ b/pacundo.pl @@ -125,6 +125,9 @@ $n, $tx->{action}, $tx->{pkg_name} foreach my $i (@sel) { if ($i =~ /^[0-9]+-[0-9]+$/) { my ($start, $end) = $i =~ /^([0-9]+)-([0-9]+)$/; + if ($start >= $end) { + die("Invalid range: $start-$end\n"); + } push(@sel, ($start..$end)); } }