From be3c71fa81e6d35a1fae0612a8b7b4b613d7d2f6 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 30 Jul 2013 15:24:48 -0400 Subject: avoid injecting code into the format string Now that die() properly forwards arguments to error(), we can expect that the first arg is a format string and not the entirety of the output. Signed-off-by: Dave Reisner Signed-off-by: Pierre Schmitz --- arch-nspawn.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index 441b502..a05ca1c 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -88,9 +88,9 @@ umask 0022 # Sanity check if [[ ! -f "$working_dir/.arch-chroot" ]]; then - die "'$working_dir' does not appear to be a Arch chroot." + die "'%s' does not appear to be a Arch chroot." "$working_dir" elif [[ $(cat "$working_dir/.arch-chroot") != $CHROOT_VERSION ]]; then - die "chroot '$working_dir' is not at version $CHROOT_VERSION. Please rebuild." + die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION" fi build_mount_args -- cgit v1.2.3