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

oldstable
James Hawkins 2006-04-07 01:16:48 -05:00 committed by Alexandre Julliard
parent e0276035a4
commit 14faf12845
1 changed files with 1 additions and 1 deletions

View File

@ -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;