summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c')
-rw-r--r--ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c b/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
index a4820c9970..116c78f38b 100644
--- a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
+++ b/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
@@ -765,6 +765,9 @@ StrnCatGrowLeft (
} else {
*Destination = AllocateZeroPool(Count+sizeof(CHAR16));
}
+ if (*Destination == NULL) {
+ return NULL;
+ }
CopySize = StrSize(*Destination);
CopyMem((*Destination)+((Count-2)/sizeof(CHAR16)), *Destination, CopySize);