fix accidental global static pointer in ldso

this was harmless as load_library is not called concurrently,
but it used one word of bss.
This commit is contained in:
Szabolcs Nagy 2016-11-01 02:44:56 +01:00 committed by Rich Felker
parent c8fdcfe550
commit 86e8cc0fd4
1 changed files with 2 additions and 1 deletions

View File

@ -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 */ /* Catch and block attempts to reload the implementation itself */
if (name[0]=='l' && name[1]=='i' && name[2]=='b') { 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"; "c\0pthread\0rt\0m\0dl\0util\0xnet\0";
const char *rp;
char *z = strchr(name, '.'); char *z = strchr(name, '.');
if (z) { if (z) {
size_t l = z-name; size_t l = z-name;