]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.c (do_spec_1): Allocate enough space for saved_suffix.
authorChen Gang <gang.chen.5i5j@gmail.com>
Thu, 31 Jul 2014 22:31:39 +0000 (22:31 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 31 Jul 2014 22:31:39 +0000 (16:31 -0600)
From-SVN: r213387

gcc/ChangeLog
gcc/gcc.c

index 706fedc3b9549ec13b6ca7f33f276b7cab88f9f4..b64b5fff82ec8b796a992c0025a9b1fc171bc025 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-31  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+       * gcc.c (do_spec_1): Allocate enough space for saved_suffix.
+
 2014-07-31  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * config/aarch64/arm_neon.h (vpadd_<suf><8,16,32,64>): Move to
index c0fde8c8df5b4bb2687ca60a2d1a80212b54d0a6..44d041602ed8bc13234cfa24743501ab614ebf13 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4894,7 +4894,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
                      {
                        saved_suffix
                          = XNEWVEC (char, suffix_length
-                                    + strlen (TARGET_OBJECT_SUFFIX));
+                                    + strlen (TARGET_OBJECT_SUFFIX) + 1);
                        strncpy (saved_suffix, suffix, suffix_length);
                        strcpy (saved_suffix + suffix_length,
                                TARGET_OBJECT_SUFFIX);