* [PATCH] fix accidental global static pointer in ldso
@ 2016-11-01 1:44 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2016-11-01 1:44 UTC (permalink / raw)
To: musl
this was harmless as load_library is not called concurrently,
but it used one word of bss.
---
ldso/dynlink.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index e458f38..d11776d 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -905,8 +905,9 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
/* Catch and block attempts to reload the implementation itself */
if (name[0]=='l' && name[1]=='i' && name[2]=='b') {
- static const char *rp, reserved[] =
+ static const char reserved[] =
"c\0pthread\0rt\0m\0dl\0util\0xnet\0";
+ const char *rp;
char *z = strchr(name, '.');
if (z) {
size_t l = z-name;
--
2.10.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-01 1:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 1:44 [PATCH] fix accidental global static pointer in ldso Szabolcs Nagy
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).