From 5cbc0eb01a403419d7be753bfdbf1c638a92d759 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 9 Nov 2020 23:23:34 +1030 Subject: [PATCH] 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. --- 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 + + * vms-alpha.c (alpha_vms_write_exec): Write 16 bits to eihd.alias. + 2020-11-09 Alan Modra * 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)); -- 2.30.2