mirror of git://git.musl-libc.org/musl
fix off-by-one error in checks for implementation-internal signal numbers
This commit is contained in:
parent
b823ef2db1
commit
23815f88df
|
@ -4,7 +4,7 @@
|
|||
int sigaddset(sigset_t *set, int sig)
|
||||
{
|
||||
unsigned s = sig-1;
|
||||
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
|
||||
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
int sigdelset(sigset_t *set, int sig)
|
||||
{
|
||||
unsigned s = sig-1;
|
||||
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
|
||||
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
int sigismember(const sigset_t *set, int sig)
|
||||
{
|
||||
unsigned s = sig-1;
|
||||
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
|
||||
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue