提交 2ceee875 编写于 作者: D Download-Fritz

OcAppleImageVerificationLib: Fix potential memory corruption

The reallocated pointer is not returned and thus lost locally (leak). Because ReallocatePool frees the old buffer on success, the caller pointers are unsafe after calling this function (potential corruption). Because the rest of the buffer is zero'd right before, there should be no security concern keeping the current buffer.
上级 3e9ef5ac
......@@ -548,14 +548,6 @@ SanitizeApplePeImage (
(UINT8 *) Image + *RealImageSize,
ImageSize - *RealImageSize
);
//
// Reallocate file buffer
//
Image = ReallocatePool (
ImageSize,
*RealImageSize,
Image
);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册