From: Rich Felker Date: Tue, 9 Jul 2013 06:11:52 +0000 (-0400) Subject: fix off-by-one array bound in strsignal X-Git-Tag: v0.9.12~77 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8599822ee1d70a1e42e1d4b4962bc1d0bdf7e5ab;p=oweals%2Fmusl.git fix off-by-one array bound in strsignal --- diff --git a/src/string/strsignal.c b/src/string/strsignal.c index 3b0ae6d7..d70982aa 100644 --- a/src/string/strsignal.c +++ b/src/string/strsignal.c @@ -48,7 +48,7 @@ static const char map[] = { [SIGSYS] = 31 }; -#define sigmap(x) ((unsigned)(x) > sizeof map ? 0 : map[(unsigned)(x)]) +#define sigmap(x) ((unsigned)(x) >= sizeof map ? 0 : map[(unsigned)(x)]) #endif