diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-03 06:28:41 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-03 06:28:41 +0000 |
commit | d20db0561a6a36f914fde030512503b114ef9a0c (patch) | |
tree | d4e5e3494d95c269a1cee6195f11bf3201bcadbf /rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch | |
parent | 016343d99b1b269d7246ef1e143d4b54914433d4 (diff) |
automatic import of glibcopeneuler22.03_LTS_SP4openeuler22.03_LTS_SP3openeuler20.03
Diffstat (limited to 'rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch')
-rw-r--r-- | rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch b/rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch new file mode 100644 index 0000000..6f73106 --- /dev/null +++ b/rtld-copy-terminating-null-in-tunables_strdup-bug-28.patch @@ -0,0 +1,28 @@ +From a4f5a3103fc3e7974dbe35b411cba9f670807cde Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <schwab@linux-m68k.org> +Date: Mon, 23 Aug 2021 10:19:52 +0200 +Subject: [PATCH] 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. +--- + elf/dl-tunables.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c +index 8009e54..1666736 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]; + +-- +1.8.3.1 + |