|
Message-ID: <20241218091222.3426257-1-lihua.zhao.cn@windriver.com> Date: Wed, 18 Dec 2024 17:12:22 +0800 From: <lihua.zhao.cn@...driver.com> To: <musl@...ts.openwall.com> CC: <lihua.zhao.cn@...driver.com> Subject: [PATCH v3] signal: check sigpause() input parameter From: Lihua Zhao <lihua.zhao.cn@...driver.com> --- src/signal/sigpause.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/signal/sigpause.c b/src/signal/sigpause.c index 363d2fec..b8f577ce 100644 --- a/src/signal/sigpause.c +++ b/src/signal/sigpause.c @@ -3,7 +3,6 @@ int sigpause(int sig) { sigset_t mask; - sigprocmask(0, 0, &mask); - sigdelset(&mask, sig); + if (sigprocmask(0, 0, &mask) || sigdelset(&mask, sig)) return -1; return sigsuspend(&mask); } -- 2.34.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.