From 14faf12845a7359dabc4aced7e3eca7849be0183 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Fri, 7 Apr 2006 01:16:48 -0500 Subject: [PATCH] ntdll: Return error if the signal index equals the size of the array. --- dlls/ntdll/signal_i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index d957cd32b40..39b20d0d687 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1436,7 +1436,7 @@ static int set_handler( int sig, int have_sigaltstack, void (*func)() ) */ int __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) { - if (sig > sizeof(handlers) / sizeof(handlers[0])) return -1; + if (sig >= sizeof(handlers) / sizeof(handlers[0])) return -1; if (handlers[sig] != NULL) return -2; handlers[sig] = wsh; return 0;