From 2adf2fb372745a406544188029d3f769f71a9f2c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 17 Jan 2012 00:34:58 -0500 Subject: [PATCH] fix char signedness bug in dynlinker hash function this only affects non-ascii symbol names, which are probably not in use anyway.. --- src/ldso/dynlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 1b55e077..86d4b803 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -73,8 +73,9 @@ static void decode_vec(size_t *v, size_t *a, size_t cnt) } } -static uint32_t hash(const char *s) +static uint32_t hash(const char *s0) { + const unsigned char *s = (void *)s0; uint_fast32_t h = 0; while (*s) { h = 16*h + *s++; -- 2.25.1