Blame SOURCES/0389-script-execute-Fix-NULL-dereference-in-grub_script_e.patch

b1bcb2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b1bcb2
From: Daniel Axtens <dja@axtens.net>
b1bcb2
Date: Fri, 3 Apr 2020 23:05:13 +1100
b1bcb2
Subject: [PATCH] script/execute: Fix NULL dereference in
b1bcb2
 grub_script_execute_cmdline()
b1bcb2
b1bcb2
Signed-off-by: Daniel Axtens <dja@axtens.net>
b1bcb2
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
b1bcb2
---
b1bcb2
 grub-core/script/execute.c | 2 +-
b1bcb2
 1 file changed, 1 insertion(+), 1 deletion(-)
b1bcb2
b1bcb2
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
b1bcb2
index 52ccbd9965b..04ffb9b4740 100644
b1bcb2
--- a/grub-core/script/execute.c
b1bcb2
+++ b/grub-core/script/execute.c
b1bcb2
@@ -960,7 +960,7 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
b1bcb2
   struct grub_script_argv argv = { 0, 0, 0 };
b1bcb2
 
b1bcb2
   /* Lookup the command.  */
b1bcb2
-  if (grub_script_arglist_to_argv (cmdline->arglist, &argv) || ! argv.args[0])
b1bcb2
+  if (grub_script_arglist_to_argv (cmdline->arglist, &argv) || ! argv.args || ! argv.args[0])
b1bcb2
     return grub_errno;
b1bcb2
 
b1bcb2
   invert = 0;