diff --git a/mmdebstrap b/mmdebstrap index 9cbc8e3..5c870bb 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -4363,9 +4363,15 @@ sub main() { if (!defined $pkg) { error "cannot resolve absolute path of $pkg: $!"; } + if ($pkg !~ /^\//) { + error "absolute path of $pkg doesn't start with a slash"; + } if (!-f $pkg) { error "$pkg is not an existing file"; } + if (!-r $pkg) { + error "$pkg is not readable"; + } return $pkg; }; if ($opt_value =~ /^[?~!(]/) {