summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
index 358f63d8db..a1f9448df9 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
@@ -414,6 +414,9 @@ PerformSingleMappingDisplay(
CurrentName = NULL;
CurrentName = StrnCatGrow(&CurrentName, 0, MapList, 0);
+ if (CurrentName == NULL) {
+ return (EFI_OUT_OF_RESOURCES);
+ }
TempSpot = StrStr(CurrentName, L";");
if (TempSpot != NULL) {
*TempSpot = CHAR_NULL;