From bd850e5b980d34236ee98d16b9717860b63af306 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Sat, 5 Jan 2013 23:45:46 -0500 Subject: [PATCH] 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 Reviewed-by: Jeffrey Altman Tested-by: BuildBot --- src/lwp/iomgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lwp/iomgr.c b/src/lwp/iomgr.c index 64e9f9c6b6..b7dd1c2b58 100644 --- a/src/lwp/iomgr.c +++ b/src/lwp/iomgr.c @@ -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]);