diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | signal.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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 @@ -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) |