[PATCH] Do not strcat to result of getenv.

Martin Liška mliska@suse.cz
Fri Mar 13 12:26:02 GMT 2020


Hi.

The patch fixed wrong strcat to a char pointer received
with getenv.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2020-03-12  Martin Liska  <mliska@suse.cz>

	PR lto/94157
	* lto-wrapper.c (run_gcc): Allocate a new buffer.
	Do not strcat to result of getenv.

gcc/testsuite/ChangeLog:

2020-03-12  Martin Liska  <mliska@suse.cz>

	PR lto/94157
	* gcc.dg/lto/pr94157_0.c: New test.
---
  gcc/lto-wrapper.c                    | 6 +++++-
  gcc/testsuite/gcc.dg/lto/pr94157_0.c | 6 ++++++
  2 files changed, 11 insertions(+), 1 deletion(-)
  create mode 100644 gcc/testsuite/gcc.dg/lto/pr94157_0.c


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-not-strcat-to-result-of-getenv.patch
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200313/c6b1f8a0/attachment.bin>


More information about the Gcc-patches mailing list