aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2014-07-31 22:31:39 +0000
committerJeff Law <law@gcc.gnu.org>2014-07-31 16:31:39 -0600
commite3cb8f057f86a67e6e1adf8aeeb4f9aa536d3e4e (patch)
tree10ba22afa842800f5d394ffd9e9980ebf28f2176 /gcc/gcc.c
parentf3d95c690319417f53de95fadffee696a655b468 (diff)
downloadgcc-e3cb8f057f86a67e6e1adf8aeeb4f9aa536d3e4e.zip
gcc-e3cb8f057f86a67e6e1adf8aeeb4f9aa536d3e4e.tar.gz
gcc-e3cb8f057f86a67e6e1adf8aeeb4f9aa536d3e4e.tar.bz2
* gcc.c (do_spec_1): Allocate enough space for saved_suffix.
From-SVN: r213387
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index c0fde8c..44d0416 100644
--- 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);