summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authormycroft <mycroft@pkgsrc.org>2000-06-11 18:27:29 +0000
committermycroft <mycroft@pkgsrc.org>2000-06-11 18:27:29 +0000
commit41bc463d2aa177c49b7c101006ffd4b10c6add1d (patch)
tree57d9df7b07347024a8ec16a3b34bc6e9190a5f5b /cross
parent23bf9511b888f79748605d9f4b3170acb92a374a (diff)
downloadpkgsrc-41bc463d2aa177c49b7c101006ffd4b10c6add1d.tar.gz
Import the NUL termination bug fix from -current.
Diffstat (limited to 'cross')
-rw-r--r--cross/binutils/patches/patch-al19
1 files changed, 19 insertions, 0 deletions
diff --git a/cross/binutils/patches/patch-al b/cross/binutils/patches/patch-al
new file mode 100644
index 00000000000..df6e6e32f43
--- /dev/null
+++ b/cross/binutils/patches/patch-al
@@ -0,0 +1,19 @@
+$NetBSD: patch-al,v 1.1 2000/06/11 18:27:29 mycroft Exp $
+
+--- elflink.h.orig Fri May 1 11:48:10 1998
++++ elflink.h Sun Jun 11 14:22:40 2000
+@@ -719,12 +719,13 @@
+ }
+
+ sz = bfd_section_size (abfd, s);
+- msg = (char *) bfd_alloc (abfd, sz);
++ msg = (char *) bfd_alloc (abfd, sz + 1);
+ if (msg == NULL)
+ goto error_return;
+
+ if (! bfd_get_section_contents (abfd, s, msg, (file_ptr) 0, sz))
+ goto error_return;
++ msg[sz] = '\0';
+
+ if (! (_bfd_generic_link_add_one_symbol
+ (info, abfd, name, BSF_WARNING, s, (bfd_vma) 0, msg,