summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
index 5203f11f9b..1b6b189f25 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
@@ -64,6 +64,10 @@ FindHiiHandleViaDevPath(
return (Status);
}
+ if (HandleBuffer == NULL) {
+ return EFI_NOT_FOUND;
+ }
+
for (LoopVariable = 0 ; LoopVariable < (HandleBufferSize/sizeof(HandleBuffer[0])) && *HiiHandle == NULL ; LoopVariable++) {
MainBufferSize = 0;
MainBuffer = NULL;