From 1a62ccec468d44483bb0fd0c016e37002a2f0333 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Mon, 23 Oct 2023 11:51:14 +0200 Subject: [PATCH] do not run genext2fs if $numblocks value is invalid --- mmdebstrap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index d457c3a..435c335 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -6175,6 +6175,8 @@ sub main() { # nothing to do } elsif (any { $_ eq $options->{format} } ('directory', 'null')) { # nothing to do + } elsif ($options->{format} eq 'ext2' && $numblocks <= 0) { + # nothing to do because of invalid $numblocks } elsif (any { $_ eq $options->{format} } ('tar', 'squashfs', 'ext2')) { # we use eval() so that error() doesn't take this process down and # thus leaves the setup() process without a parent