Преглед на файлове

[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>
tags/v1.20.1
Michael Brown преди 8 години
родител
ревизия
ed609c4889
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      src/util/elf2efi.c

+ 1
- 1
src/util/elf2efi.c Целия файл

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

Loading…
Отказ
Запис