From: Alan Modra Date: Tue, 6 Jan 2015 16:46:40 +0000 (+0000) Subject: Fixes a buffer overflow when compiling assembler for the MinGW targets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60ebc25751744f54ae5c00d1c9198ab64fcc5b33;p=binutils-gdb.git Fixes a buffer overflow when compiling assembler for the MinGW targets. PR binutils/17754 * internal.h (internal_auxent): Increase size of x_fname field to 20 to allow for PE format's longer file names. --- diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog index 343298f91b8..232e4fca3bd 100644 --- a/include/coff/ChangeLog +++ b/include/coff/ChangeLog @@ -1,3 +1,9 @@ +2015-01-06 Alan Modra + + PR binutils/17754 + * internal.h (internal_auxent): Increase size of x_fname field to + 20 to allow for PE format's longer file names. + 2015-01-01 Alan Modra Update year range in copyright notice of all files. diff --git a/include/coff/internal.h b/include/coff/internal.h index 83295645d4f..c4f24bb1e0a 100644 --- a/include/coff/internal.h +++ b/include/coff/internal.h @@ -588,7 +588,11 @@ union internal_auxent union { - char x_fname[FILNMLEN]; + /* PR 17754: We use to FILNMLEN for the size of the x_fname + array, but that cause problems as PE targets use a larger + value. We cannot use their definition of EFILNMLEN as this + header can be used without including any PE headers. */ + char x_fname[20]; struct { long x_zeroes;