提交 8599822e 编写于 作者: R Rich Felker

fix off-by-one array bound in strsignal

上级 b6218764
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册