diff options
author | Martin Liska <mliska@suse.cz> | 2020-03-13 13:50:01 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-03-13 13:50:01 +0100 |
commit | 98ff89d1ac5872f29020fe5b5edfdf5abce59014 (patch) | |
tree | df56046e29ea5221aedee3252669de596a68bb7f /gcc/lto-wrapper.c | |
parent | 43d513af3f2026420312cc709dd729c81862de0c (diff) | |
download | gcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.zip gcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.tar.gz gcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.tar.bz2 |
Do not strcat to result of getenv.
PR lto/94157
* lto-wrapper.c (run_gcc): Use concat for appending
to collect_gcc_options.
PR lto/94157
* gcc.dg/lto/pr94157_0.c: New test.
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r-- | gcc/lto-wrapper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index b8a35c8..46a88b2 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1317,7 +1317,8 @@ run_gcc (unsigned argc, char *argv[]) char *xassembler_opts_string = XOBFINISH (&temporary_obstack, char *); - strcat (collect_gcc_options, xassembler_opts_string); + collect_gcc_options = concat (collect_gcc_options, xassembler_opts_string, + NULL); } get_options_from_collect_gcc_options (collect_gcc, collect_gcc_options, |