in clock_getres, check for null pointer before storing result
[musl] / src / signal / sigdelset.c
index 14042fb..ce69280 100644 (file)
@@ -4,7 +4,7 @@
 int sigdelset(sigset_t *set, int sig)
 {
        unsigned s = sig-1;
-       if (s >= 8*sizeof(sigset_t)) {
+       if (s >= _NSIG-1 || sig-32U < 3) {
                errno = EINVAL;
                return -1;
        }