summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--signal.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fda232bbb2..94e49902e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat May 6 00:38:42 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * signal.c (trap): sig should be less then NSIG. Coverity found
+ this bug. a patch from Kevin Tew <tewk at tewk.com>.
+ [ruby-core:07823]
+
Thu May 4 02:24:16 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
diff --git a/signal.c b/signal.c
index 3003ceabf9..fc8d95776f 100644
--- a/signal.c
+++ b/signal.c
@@ -578,7 +578,7 @@ trap(arg)
rb_raise(rb_eArgError, "unsupported signal SIG%s", s);
}
- if (sig < 0 || sig > NSIG) {
+ if (sig < 0 || sig >= NSIG) {
rb_raise(rb_eArgError, "invalid signal number (%d)", sig);
}
#if defined(HAVE_SETITIMER)