efi_loader: don't load beyond VirtualSize
PE section table entries' SizeOfRawData must be a multiple of FileAlignment, and thus may be rounded up and larger than their VirtualSize. We should not load beyond the VirtualSize, which is "the total size of the section when loaded into memory" -- we may clobber real data at the target in some other section, since we load sections in reverse order and sections are usually laid out sequentially. Signed-off-by: NAsherah Connor <ashe@kivikakk.ee> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Showing
想要评论请 注册 或 登录