From 8599822ee1d70a1e42e1d4b4962bc1d0bdf7e5ab Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 9 Jul 2013 02:11:52 -0400 Subject: [PATCH] fix off-by-one array bound in strsignal --- src/string/strsignal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.25.1