commit | 1ca3a099383997be7aa071c0c211814f72c9ce4d | [log] [tgz] |
---|---|---|
author | Chao Zhang <chao.b.zhang@intel.com> | Wed Jul 15 02:13:48 2015 +0000 |
committer | czhang46 <czhang46@Edk2> | Wed Jul 15 02:13:48 2015 +0000 |
tree | 34af211543996a7e28f6c22d8c56dd8168f6bc5d | |
parent | 368110120b8266f70924dd15a6d09afcb58767b7 [diff] |
SecurityPkg: Fix DBX Variable Read Error in ImageVerificationLib ImageVerificationLib passes wrong data buffer size when reading DBX variable, causing heap crash. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17981 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 3331b68..ca1bdc0 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
@@ -1448,7 +1448,7 @@ if (Status == EFI_BUFFER_TOO_SMALL) { goto Done; } - DbxData = (UINT8 *) AllocateZeroPool (DataSize); + DbxData = (UINT8 *) AllocateZeroPool (DbxDataSize); if (DbxData == NULL) { goto Done; }