MdeModulePkg CapsuleApp: Check Arg count for -D option

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2018-07-11 11:45:50 +08:00
parent 79b10d4ce4
commit 1c6dd45b9b
1 changed files with 4 additions and 0 deletions

View File

@ -792,6 +792,10 @@ UefiMain (
return EFI_INVALID_PARAMETER;
}
if (StrCmp(Argv[1], L"-D") == 0) {
if (Argc < 3) {
Print(L"CapsuleApp: NO input capsule name.\n");
return EFI_INVALID_PARAMETER;
}
Status = DumpCapsule(Argv[2]);
return Status;
}