]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fixes a buffer overflow when compiling assembler for the MinGW targets.
authorAlan Modra <amodra@gmail.com>
Tue, 6 Jan 2015 16:46:40 +0000 (16:46 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 6 Jan 2015 16:46:40 +0000 (16:46 +0000)
PR binutils/17754
* internal.h (internal_auxent): Increase size of x_fname field to
20 to allow for PE format's longer file names.

include/coff/ChangeLog
include/coff/internal.h

index 343298f91b851015650bd93094ae87fc76a07ae6..232e4fca3bdb4b5d457e366259fe8a6315ebca73 100644 (file)
@@ -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.
index 83295645d4f2c127286f42630197da4c0065b8ff..c4f24bb1e0af42fecd88144b3b60fb93300ede21 100644 (file)
@@ -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;