aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-06 16:46:40 +0000
committerNick Clifton <nickc@redhat.com>2015-01-06 16:46:40 +0000
commit60ebc25751744f54ae5c00d1c9198ab64fcc5b33 (patch)
treec9241d9ee32ae0223125d0467c96271f18570fcb /include
parent85880250e591a51624d24db653aaace0c5ce5943 (diff)
downloadgdb-60ebc25751744f54ae5c00d1c9198ab64fcc5b33.zip
gdb-60ebc25751744f54ae5c00d1c9198ab64fcc5b33.tar.gz
gdb-60ebc25751744f54ae5c00d1c9198ab64fcc5b33.tar.bz2
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.
Diffstat (limited to 'include')
-rw-r--r--include/coff/ChangeLog6
-rw-r--r--include/coff/internal.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 343298f..232e4fc 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-06 Alan Modra <amodra@gmail.com>
+
+ 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 <amodra@gmail.com>
Update year range in copyright notice of all files.
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 8329564..c4f24bb 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;