bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/14289] bfd_pef_xlib_read_header overwrites stack memory


From: asmwarrior at gmail dot com
Subject: [Bug binutils/14289] bfd_pef_xlib_read_header overwrites stack memory
Date: Wed, 25 Dec 2013 01:14:27 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=14289

--- Comment #2 from asmwarrior <asmwarrior at gmail dot com> ---
Is this the patch to fix this issue?

diff --git a/bfd/pef.c b/bfd/pef.c
index 6c52e0f..64925e5 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -1065,11 +1065,11 @@ const bfd_target pef_vec =
 static int
 bfd_pef_xlib_read_header (bfd *abfd, bfd_pef_xlib_header *header)
 {
-  unsigned char buf[76];
+  unsigned char buf[80];

   bfd_seek (abfd, 0, SEEK_SET);

-  if (bfd_bread ((void *) buf, 76, abfd) != 76)
+  if (bfd_bread ((void *) buf, 80, abfd) != 80)
     return -1;

   header->tag1 = bfd_getb32 (buf);

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]