]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/Shell.c
pointer verification (not NULL) and buffer overrun fixes.
[mirror_edk2.git] / ShellPkg / Application / Shell / Shell.c
index 17943531dbb08b13aa00d5a2e13a85c8d0a04776..ecd48cdd78719149670ff1f464e955e9d1963b52 100644 (file)
@@ -731,7 +731,7 @@ ProcessCommandLine(
     ShellInfoObject.ShellInitSettings.Delay = 0;\r
   } else if (ShellInfoObject.ShellInitSettings.BitUnion.Bits.Delay) {\r
     TempConst = ShellCommandLineGetValue(Package, L"-delay");\r
-    if (*TempConst == L':') {\r
+    if (TempConst != NULL && *TempConst == L':') {\r
       TempConst++;\r
     }\r
     if (TempConst != NULL && !EFI_ERROR(ShellConvertStringToUint64(TempConst, &Intermediate, FALSE, FALSE))) {\r