mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
sd-event: do not assert on invalid signal
The signalfd_siginfo struct is received from outside via a FD, hence assert() is not appropriate way to check it. Just do a normal runtime check. (cherry picked from commit 7a64c5f23efbb51fe4f1229c1a8aed6dd858a0a9) (cherry picked from commit 7a48ea958bf146a45cb4a3b7ff7aeb5885469196) (cherry picked from commit 5fa8b5d74aa81e884613ba68c6f765834e6dd02c)
This commit is contained in:
parent
0d624910a4
commit
74fa56ebc3
@ -3830,7 +3830,8 @@ static int process_signal(sd_event *e, struct signal_data *d, uint32_t events, i
|
||||
if (_unlikely_(n != sizeof(si)))
|
||||
return -EIO;
|
||||
|
||||
assert(SIGNAL_VALID(si.ssi_signo));
|
||||
if (_unlikely_(!SIGNAL_VALID(si.ssi_signo)))
|
||||
return -EINVAL;
|
||||
|
||||
if (e->signal_sources)
|
||||
s = e->signal_sources[si.ssi_signo];
|
||||
|
Loading…
x
Reference in New Issue
Block a user