mirror of
https://github.com/systemd/systemd.git
synced 2024-12-01 06:13:38 +08: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.
This commit is contained in:
parent
639719e010
commit
7a64c5f23e
@ -3871,7 +3871,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…
Reference in New Issue
Block a user