Commit 0ece6b50 authored by Tuomas Tynkkynen's avatar Tuomas Tynkkynen Committed by Tom Rini
Browse files

pxe: Fix crash if 'sysboot' is run without args



Previously, a NULL pointer dereference would occur if the 'sysboot'
command is executed without any arguments.
Signed-off-by: default avatarTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 445614cc
...@@ -1648,7 +1648,7 @@ static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ...@@ -1648,7 +1648,7 @@ static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
is_pxe = false; is_pxe = false;
if (strstr(argv[1], "-p")) { if (argc > 1 && strstr(argv[1], "-p")) {
prompt = 1; prompt = 1;
argc--; argc--;
argv++; argv++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment