public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/lld] rtld: copy terminating null in tunables_strdup (bug 28256)
@ 2021-08-25 4:22 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-25 4:22 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a4f5a3103fc3e7974dbe35b411cba9f670807cde
commit a4f5a3103fc3e7974dbe35b411cba9f670807cde
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Mon Aug 23 10:19:52 2021 +0200
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.
Diff:
---
elf/dl-tunables.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index 8009e54ee5..1666736bc1 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -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];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-25 4:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 4:22 [glibc/maskray/lld] rtld: copy terminating null in tunables_strdup (bug 28256) Fangrui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).