[binutils-gdb] asan: vms-alpha: stack buffer overflow
Alan Modra
amodra@sourceware.org
Mon Nov 9 13:01:50 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5cbc0eb01a403419d7be753bfdbf1c638a92d759
commit 5cbc0eb01a403419d7be753bfdbf1c638a92d759
Author: Alan Modra <amodra@gmail.com>
Date: Mon Nov 9 23:23:34 2020 +1030
asan: vms-alpha: stack buffer overflow
32 bits is too big for the field.
* vms-alpha.c (alpha_vms_write_exec): Write 16 bits to eihd.alias.
Diff:
---
bfd/ChangeLog | 4 ++++
bfd/vms-alpha.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0d1d63d5fed..81d84e6fd44 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-09 Alan Modra <amodra@gmail.com>
+
+ * vms-alpha.c (alpha_vms_write_exec): Write 16 bits to eihd.alias.
+
2020-11-09 Alan Modra <amodra@gmail.com>
* archive.c (bfd_ar_hdr_from_filesystem): Use bfd_set_input_error
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 5bf32d67803..471e0215e64 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -3252,7 +3252,7 @@ alpha_vms_write_exec (bfd *abfd)
bfd_putl32 (16, eihd.virt_mem_block_size);
bfd_putl32 (0, eihd.ext_fixup_off);
bfd_putl32 (0, eihd.noopt_psect_off);
- bfd_putl32 (-1, eihd.alias);
+ bfd_putl16 (-1, eihd.alias);
/* Alloc EIHA. */
eiha = (struct vms_eiha *)((char *) &eihd + PRIV (file_pos));
More information about the Binutils-cvs
mailing list