From b0e390f1d35d1d4fd8ff7f7f606fbd7569a4f62b Mon Sep 17 00:00:00 2001 From: James Gutbub Date: Thu, 15 Aug 2019 13:48:37 -0700 Subject: [PATCH] Fix ContainerLib flash bug There is a small bug in the ContainerLib where the check for whether the data is stored in the flash needs to be adjusted. Signed-off-by: James Gutbub --- BootloaderCommonPkg/Library/ContainerLib/ContainerLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BootloaderCommonPkg/Library/ContainerLib/ContainerLib.c b/BootloaderCommonPkg/Library/ContainerLib/ContainerLib.c index 29831193..b11ae9fd 100644 --- a/BootloaderCommonPkg/Library/ContainerLib/ContainerLib.c +++ b/BootloaderCommonPkg/Library/ContainerLib/ContainerLib.c @@ -500,7 +500,7 @@ LoadComponentWithCallback ( // before authentication for security concern. IsInFlash = IS_FLASH_ADDRESS (CompData); AllocLen = ScrLen + TEMP_BUF_ALIGN * 2; - if (!IsInFlash) { + if (IsInFlash) { AllocLen += SignedDataLen; } AllocBuf = AllocateTemporaryMemory (AllocLen);