diff options
Diffstat (limited to 'MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c')
-rw-r--r-- | MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c index 86678e965d..642b754d64 100644 --- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c +++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c @@ -930,6 +930,11 @@ FileHandleReturnLine ( Status = FileHandleReadLine (Handle, RetVal, &Size, FALSE, Ascii);
if (Status == EFI_BUFFER_TOO_SMALL) {
RetVal = AllocateZeroPool (Size);
+
+ if (RetVal == NULL) {
+ return NULL;
+ }
+
Status = FileHandleReadLine (Handle, RetVal, &Size, FALSE, Ascii);
}
|