From 12485f72761cd3ac2fb35d7a8542015bb0a2fd1e Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 2 Jan 2019 15:21:55 +0100 Subject: [PATCH] Prevent stack overrun in binutils (issue #69) --- binutils/bfd/coff-rs6000.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/binutils/bfd/coff-rs6000.c b/binutils/bfd/coff-rs6000.c index 4e0f52d0ba..baae70e4e2 100644 --- a/binutils/bfd/coff-rs6000.c +++ b/binutils/bfd/coff-rs6000.c @@ -470,16 +470,7 @@ _bfd_xcoff_swap_aux_in (bfd *abfd, void * ext1, int type, int in_class, } else { - if (numaux > 1) - { - if (indx == 0) - memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, - numaux * sizeof (AUXENT)); - } - else - { - memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN); - } + memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN); } goto end;