From bfe9b6a8d384739cfe98fcc54bdb55a894cc9d0c 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. Reviewed-on: http://gerrit.openafs.org/8883 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit bd850e5b980d34236ee98d16b9717860b63af306) Change-Id: I859c654b8d35484aeeb029432c69848846335fb8 Reviewed-on: http://gerrit.openafs.org/9516 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- 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 74df51754..7774ecf56 100644 --- a/src/lwp/iomgr.c +++ b/src/lwp/iomgr.c @@ -709,7 +709,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]); -- 2.39.5