lwp/iomgr.c: avoid off-by-one out-of-bounds access

Avoid accessing sigDelivered[NSIG] and sigEvents[NSIG], which are
out-of-bounds by one.

Change-Id: Id6a1798cba901987b8103f287e0869b31040b45b
Reviewed-on: http://gerrit.openafs.org/8883
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Nickolai Zeldovich 2013-01-05 23:45:46 -05:00 committed by Jeffrey Altman
parent 4d6967e0b0
commit bd850e5b98

View File

@ -672,7 +672,7 @@ static int SignalSignals (void)
sigProc[i] = 0;
}
for (i = 1; i <= NSIG; ++i) /* forall !badsig(i) */
for (i = 1; i < NSIG; ++i) /* forall !badsig(i) */
if ((sigsHandled & mysigmask(i)) && sigDelivered[i] == TRUE) {
sigDelivered[i] = FALSE;
LWP_NoYieldSignal (sigEvents[i]);