mirror of https://github.com/acidanthera/audk.git
DestPtr may point to the lower aligned address in the free memory region (FreeMemBase, FreeMemBase + FreeMemSize), the free memory region may be updated to override the private signature. So update FreeMemSize to avoid the potential overlap.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13303 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2e4c9e0158
commit
4694dd1ba8
|
@ -945,7 +945,7 @@ CapsuleDataCoalesce (
|
|||
DestPtr = FreeMemBase + FreeMemSize - CapsuleSize;
|
||||
DestPtr = (UINT8 *) ((UINTN) DestPtr &~ (UINTN) (sizeof (UINTN) - 1));
|
||||
FreeMemBase = (UINT8 *) BlockList + DescriptorsSize;
|
||||
FreeMemSize = FreeMemSize - DescriptorsSize - CapsuleSize;
|
||||
FreeMemSize = (UINTN) DestPtr - (UINTN) FreeMemBase;
|
||||
NewCapsuleBase = (VOID *) DestPtr;
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue