mirror of
https://git.tukaani.org/xz.git
synced 2025-12-11 16:08:45 +00:00
xz: Check return value of sigaction() before calling raise()
Fixes: Coverity CID 456022
This commit is contained in:
parent
6cc2da0a4b
commit
c410ccc625
@ -187,8 +187,14 @@ signals_exit(void)
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigfillset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
sigaction(sig, &sa, NULL);
|
||||
raise(sig);
|
||||
|
||||
// This shouldn't fail, but check it anyway.
|
||||
if (sigaction(sig, &sa, NULL) == 0)
|
||||
raise(sig);
|
||||
|
||||
// We shouldn't get here, but just in case we do,
|
||||
// make main() exit with E_ERROR.
|
||||
set_exit_status(E_ERROR);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user