david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[efi] Fix debug directory size

The debug directory size specified in the data directory should cover
only the EFI_IMAGE_DEBUG_DIRECTORY_ENTRY structure, not the whole of
the .debug section.

Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2015-09-01 01:29:23 +01:00
parent bd96c6fffd
commit ed609c4889
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ create_debug_section ( struct pe_header *pe_header, const char *filename ) {
debugdir = &(pe_header->nt.OptionalHeader.DataDirectory
[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]);
debugdir->VirtualAddress = debug->hdr.VirtualAddress;
debugdir->Size = debug->hdr.Misc.VirtualSize;
debugdir->Size = sizeof ( contents->debug );
return debug;
}