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

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: 's avatarTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: 's 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[])
is_pxe = false;
if (strstr(argv[1], "-p")) {
if (argc > 1 && strstr(argv[1], "-p")) {
prompt = 1;
argc--;
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