Coverity flags the signal_sources array access as a potential
out-of-bounds read because it cannot trace through the SIGNAL_VALID()
macro to know that ssi_signo < _NSIG. Add an explicit assert after
the runtime check to make the constraint visible to static analyzers.
CID#
1548033
Follow-up for
7a64c5f23efbb51fe4f1229c1a8aed6dd858a0a9
if (_unlikely_(!SIGNAL_VALID(si.ssi_signo)))
return -EIO;
+ /* Silence static analyzers */
+ assert(si.ssi_signo < _NSIG);
+
if (e->signal_sources)
s = e->signal_sources[si.ssi_signo];
if (!s)