summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-02-15 17:25:35 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-02-15 17:25:35 -0500
commiteb2be0e65671bd5027d278d9baf36f0dc4c9215f (patch)
tree600bbcd049534f17e84ed60d7c3589174aba20b5 /gcc/gcc.c
parent59927d6b34200089c30740a2d1883e9272d6bdbe (diff)
downloadgcc-eb2be0e65671bd5027d278d9baf36f0dc4c9215f.tar.gz
(process_command): Allocate space for terminating null.
From-SVN: r13641
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 0ec3ecab890..4be2f62db37 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2540,7 +2540,7 @@ process_command (argc, argv)
1, 0, NULL_PTR);
else
{
- char *string = xmalloc (len);
+ char *string = xmalloc (len + 1);
strncpy (string, value, len-7);
strcpy (string+len-7, "include");
add_prefix (&include_prefixes, string,