]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
ShellPkg: Add check for "dump" parameter in "bcfg" command
[mirror_edk2.git] / ShellPkg / Library / UefiShellBcfgCommandLib / UefiShellBcfgCommandLib.c
index 9baeecc339ed3807cb105778d2af3b46ec9303c6..e2306bf469b32d13f23e9d19307ac66ce88fe9f5 100644 (file)
@@ -1296,6 +1296,10 @@ ShellCommandRunBcfg (
         CurrentParam = ShellCommandLineGetRawValue(Package, ParamNumber);\r
         if        (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"dump") == 0)    {\r
           CurrentOperation.Type = BcfgTypeDump;\r
+          if (ShellCommandLineGetCount(Package) > 3) {\r
+            ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellBcfgHiiHandle, L"bcfg");\r
+            ShellStatus = SHELL_INVALID_PARAMETER;\r
+          }\r
         } else if (ShellCommandLineGetFlag(Package, L"-v")) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"-v (without dump)");  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r