diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c index b88765f1d..25158407d 100644 --- a/grub-core/script/execute.c +++ b/grub-core/script/execute.c @@ -624,6 +624,9 @@ grub_script_arglist_to_argv (struct grub_script_arglist *arglist, struct grub_script_arg *arg = 0; struct grub_script_argv result = { 0, 0, 0 }; + if (arglist == NULL) + return 1; + for (; arglist && arglist->arg; arglist = arglist->next) { if (grub_script_argv_next (&result))