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

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 7 05:04:45 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 14faf12845a7359dabc4aced7e3eca7849be0183
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=14faf12845a7359dabc4aced7e3eca7849be0183

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Apr  7 01:16:48 2006 -0500

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

---

 dlls/ntdll/signal_i386.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index d957cd3..39b20d0 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1436,7 +1436,7 @@ static int set_handler( int sig, int hav
  */
 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;




More information about the wine-cvs mailing list