From e439a713ab966fba4cbf495ffb863a275f745dfb Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 11 Jul 2016 12:19:15 +0200 Subject: [PATCH] fix a possible undefined value error --- src/PVE/LXC.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 6cd4c71..84f13f9 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1215,7 +1215,9 @@ sub mountpoint_mount { # device-mapper devices is special-cased to use the /dev/mapper symlinks. # Our autodev hook expects the /dev/dm-* device currently # and will create the /dev/mapper symlink accordingly - ($path) = (Cwd::realpath($path) =~ /^(.*)$/s); # realpath() taints + $path = Cwd::realpath($path); + die "failed to get device path\n" if !$path; + ($path) = ($path =~ /^(.*)$/s); #untaint my $domount = sub { my ($path) = @_; if ($mount_path) { -- 2.39.2