ntdll: Return error if the signal index equals the size of the array.
This commit is contained in:
parent
e0276035a4
commit
14faf12845
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue