提交 96f21974 编写于 作者: R Rich Felker

fix null pointer dereference introduced in last sigprocmask commit

上级 eee150f3
...@@ -12,7 +12,7 @@ int __sigprocmask(int how, const sigset_t *set, sigset_t *old) ...@@ -12,7 +12,7 @@ int __sigprocmask(int how, const sigset_t *set, sigset_t *old)
{ {
sigset_t tmp; sigset_t tmp;
/* Disallow blocking thread control signals */ /* Disallow blocking thread control signals */
if (how != SIG_UNBLOCK) { if (set && how != SIG_UNBLOCK) {
tmp = *set; tmp = *set;
set = &tmp; set = &tmp;
sigdelset(&tmp, SIGCANCEL); sigdelset(&tmp, SIGCANCEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册