]> git.ipfire.org Git - thirdparty/gcc.git/commit
d: Insert null terminator in obstack buffers
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 26 Jul 2021 15:06:08 +0000 (17:06 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 30 Jul 2021 10:51:35 +0000 (12:51 +0200)
commitb2abe4e1aded1409964b870899d18dfdb6384821
tree0fa9e7eff298131f8450c45cf0b229af6b9a2536
parentbafda275371c43a67a9f84813886b9aa6cf4cd98
d: Insert null terminator in obstack buffers

Covers cases where functions that handle the extracted strings ignore
the explicit length.  This isn't something that's known to happen in the
current front-end, but the self-hosted front-end has been observed to do
this in its conversions between D and C-style strings.

gcc/d/ChangeLog:

* d-lang.cc (deps_add_target): Insert null terminator in buffer.
(deps_write): Likewise.
(d_parse_file): Likewise.
gcc/d/d-lang.cc