ntdll: Fix off-by-one errors in __wine_set_signal_handler.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e1f1a60f87
commit
d4ab672cf5
|
@ -860,7 +860,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
|||
*/
|
||||
int CDECL __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;
|
||||
|
|
|
@ -732,7 +732,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
|||
*/
|
||||
int CDECL __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;
|
||||
|
|
|
@ -940,7 +940,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
|||
*/
|
||||
int CDECL __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;
|
||||
|
|
|
@ -2762,7 +2762,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext )
|
|||
*/
|
||||
int CDECL __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;
|
||||
|
|
Loading…
Reference in New Issue