This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix buffer overrun in verilog code
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 19 Feb 2015 11:38:55 -0000
- Subject: [binutils-gdb] Fix buffer overrun in verilog code
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=837914eeb43cd0231cc3c25e8644f0d6190034e6
commit 837914eeb43cd0231cc3c25e8644f0d6190034e6
Author: Branko Drevensek <branko.drevensek@gmail.com>
Date: Thu Feb 19 22:05:21 2015 +1030
Fix buffer overrun in verilog code
PR 17995
* verilog.c (verilog_write_record): Correct buffer size.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/verilog.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6908787..f6d2513 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
+
+ PR 17995
+ * verilog.c (verilog_write_record): Correct buffer size.
+
2015-02-19 Alan Modra <amodra@gmail.com>
* elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
diff --git a/bfd/verilog.c b/bfd/verilog.c
index 89db58c..a312f49 100644
--- a/bfd/verilog.c
+++ b/bfd/verilog.c
@@ -191,7 +191,7 @@ verilog_write_record (bfd *abfd,
const bfd_byte *data,
const bfd_byte *end)
{
- char buffer[48];
+ char buffer[50];
const bfd_byte *src = data;
char *dst = buffer;
bfd_size_type wrlen;