mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-08 13:32:23 +00:00
script/execute: Fix NULL dereference in grub_script_execute_cmdline()
Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
1641d74e16
commit
41ae93b2e6
@ -940,7 +940,7 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
|
|||||||
struct grub_script_argv argv = { 0, 0, 0 };
|
struct grub_script_argv argv = { 0, 0, 0 };
|
||||||
|
|
||||||
/* Lookup the command. */
|
/* Lookup the command. */
|
||||||
if (grub_script_arglist_to_argv (cmdline->arglist, &argv) || ! argv.args[0])
|
if (grub_script_arglist_to_argv (cmdline->arglist, &argv) || ! argv.args || ! argv.args[0])
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
for (i = 0; i < argv.argc; i++)
|
for (i = 0; i < argv.argc; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user