diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-01 18:53:54 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-01 18:53:54 -0500 |
commit | 853f1cc30f75cccb85d3f9b9536ca3968f3cbcb7 (patch) | |
tree | 7a12aae275ee9fe3ae884f497390cd46f42e7a2c /gcc | |
parent | dd05a7e7c81b7daf0555ba2fd8e3d8e54ba91883 (diff) | |
download | gcc-853f1cc30f75cccb85d3f9b9536ca3968f3cbcb7.zip gcc-853f1cc30f75cccb85d3f9b9536ca3968f3cbcb7.tar.gz gcc-853f1cc30f75cccb85d3f9b9536ca3968f3cbcb7.tar.bz2 |
(process_command): Fix improper use of strncpy.
From-SVN: r13574
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gcc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* Compiler driver program that can handle many languages. - Copyright (C) 1987, 89, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1987, 89, 92-96, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -2540,9 +2540,9 @@ process_command (argc, argv) 1, 0, NULL_PTR); else { - char *string = xmalloc (len + 1); + char *string = xmalloc (len); strncpy (string, value, len-7); - strcat (string, "include"); + strcpy (string+len-7, "include"); add_prefix (&include_prefixes, string, 1, 0, NULL_PTR); } |