PR23148, Heap buffer overflow in pe_print_edata

Message ID 20180509045021.GE28782@bubble.grove.modra.org
State New
Headers show
Series
  • PR23148, Heap buffer overflow in pe_print_edata
Related show

Commit Message

Alan Modra May 9, 2018, 4:50 a.m.
PR 23148
	* peXXigen.c (pe_print_edata): Correct minimum size.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index b32cc18681..598f2ca3ac 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -1671,7 +1671,7 @@  pe_print_edata (bfd * abfd, void * vfile)
     }
 
   /* PR 17512: Handle corrupt PE binaries.  */
-  if (datasize < 36)
+  if (datasize < 40)
     {
       fprintf (file,
 	       /* xgettext:c-format */