[binutils-gdb] PR23148, Heap buffer overflow in pe_print_edata

Alan Modra amodra@sourceware.org
Wed May 9 04:50:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b4560c7d159f598c82a64b214e30fd00d88aa1fb

commit b4560c7d159f598c82a64b214e30fd00d88aa1fb
Author: Alan Modra <amodra@gmail.com>
Date:   Wed May 9 14:08:09 2018 +0930

    PR23148, Heap buffer overflow in pe_print_edata
    
    	PR 23148
    	* peXXigen.c (pe_print_edata): Correct minimum size.

Diff:
---
 bfd/ChangeLog  | 5 +++++
 bfd/peXXigen.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f158067..ecae716 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
 2018-05-09  Alan Modra  <amodra@gmail.com>
 
+	PR 23148
+	* peXXigen.c (pe_print_edata): Correct minimum size.
+
+2018-05-09  Alan Modra  <amodra@gmail.com>
+
 	PR 23147
 	* peXXigen.c (pe_print_idata): Bound check hint_addr.
 
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index b32cc18..598f2ca 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 */



More information about the Binutils-cvs mailing list