rtld: copy terminating null in tunables_strdup (bug 28256)

Avoid triggering a false positive from valgrind by copying the terminating
null in tunables_strdup.  At this point the heap is still clean, but
valgrind is stricter here.
This commit is contained in:
Andreas Schwab 2021-08-23 10:19:52 +02:00
parent f2e33c3268
commit a4f5a3103f

View File

@ -56,8 +56,6 @@ tunables_strdup (const char *in)
if (out == (void *)-1)
_dl_fatal_printf ("sbrk() failure while processing tunables\n");
i--;
while (i-- > 0)
out[i] = in[i];