summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-05 15:41:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-05 15:41:19 +0000
commit9ce5de6202442ddd39a176f8ad3f1dfa68dd9bb6 (patch)
tree0ebe2c11f9cc474427381bc9c049e4da4f1c5392 /signal.c
parenta7f999b68ec14850b1a4b74145eb4dd25dda2bc5 (diff)
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index 3003cea..fc8d957 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)