Commit 14faf128 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

ntdll: Return error if the signal index equals the size of the array.

parent e0276035
...@@ -1436,7 +1436,7 @@ static int set_handler( int sig, int have_sigaltstack, void (*func)() ) ...@@ -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) 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; if (handlers[sig] != NULL) return -2;
handlers[sig] = wsh; handlers[sig] = wsh;
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment