From 51be9a8c41e1d6e6a15bf90c60318611edbaab14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Apr 2019 14:54:42 +0200 Subject: [PATCH] kernel-install: add a check that the vmlinuz arg is sane --- src/kernel-install/kernel-install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index 610959ba9fc..e7f2beb5707 100644 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -125,6 +125,11 @@ case $COMMAND in exit 1 fi + if [[ ! -f "$KERNEL_IMAGE" ]]; then + echo "Kernel image argument ${KERNEL_IMAGE} not a file" >&2 + exit 1 + fi + for f in "${PLUGINS[@]}"; do if [[ -x $f ]]; then [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \