diff options
Diffstat (limited to 'EdkCompatibilityPkg/Foundation')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c index 400b367136..c0ce1b23f8 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c @@ -582,7 +582,7 @@ Returns: //
// Return an error if buffer is too small
//
- if (SizeOfNvStore > *ImageLength) {
+ if (SizeOfNvStore > *ImageLength || DefaultImage == NULL) {
gBS->FreePool (OldData);
*ImageLength = (UINT16) SizeOfNvStore;
return EFI_BUFFER_TOO_SMALL;
|