(process_command): Allocate space for terminating null.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 15 Feb 1997 22:25:35 +0000 (17:25 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 15 Feb 1997 22:25:35 +0000 (17:25 -0500)
From-SVN: r13641

gcc/gcc.c

index 0ec3eca..4be2f62 100644 (file)
--- 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,