X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FApplication%2FShell%2FShell.c;fp=ShellPkg%2FApplication%2FShell%2FShell.c;h=ec344137d355e2dad689bc54f71c3839a896d7f5;hp=104f4c896130e3e9c4c14863df3c07e7ecb4ca54;hb=d3912eb99e88fa1d797e06881fc6589eae831859;hpb=e8959f81003ccd80317b820f00287897191796ee diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 104f4c8961..ec344137d3 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1,7 +1,7 @@ /** @file This is THE shell (application) - Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.
Copyright 2015-2018 Dell Technologies.
This program and the accompanying materials @@ -1002,7 +1002,11 @@ ProcessCommandLine( ) == 0) { ShellInfoObject.ShellInitSettings.BitUnion.Bits.Delay = TRUE; // Check for optional delay value following "-delay" - DelayValueStr = gEfiShellParametersProtocol->Argv[LoopVar + 1]; + if ((LoopVar + 1) >= gEfiShellParametersProtocol->Argc) { + DelayValueStr = NULL; + } else { + DelayValueStr = gEfiShellParametersProtocol->Argv[LoopVar + 1]; + } if (DelayValueStr != NULL){ if (*DelayValueStr == L':') { DelayValueStr++;