Date: Sun, 18 Jul 2010 22:46:25 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: Kostik Belousov <kostikbel@gmail.com> Cc: hackers@freebsd.org Subject: [PATCH] Catch errors with sigaddset(3) in sigaddset (sighold) Message-ID: <AANLkTik4fPb1WwHZzrFop_nIR6xxl_Ygw8Av3Z5cIb4Q@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
sighold(3) doesn't determine whether or not the signal added is valid today (and sigprocmask doesn't verify that either). This fixes that. Thanks, -Garrett Index: sigcompat.c =================================================================== --- sigcompat.c (revision 210226) +++ sigcompat.c (working copy) @@ -131,7 +131,8 @@ sigset_t set; sigemptyset(&set); - sigaddset(&set, sig); + if (sigaddset(&set, sig) == -1) + return (-1); return (_sigprocmask(SIG_BLOCK, &set, NULL)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik4fPb1WwHZzrFop_nIR6xxl_Ygw8Av3Z5cIb4Q>