mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_backtrace.c (vm_backtrace_to_ary): check negative size (2nd arg).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9def782889
commit
1d193d9251
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Dec 3 16:23:09 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_backtrace.c (vm_backtrace_to_ary): check negative size (2nd arg).
|
||||
|
||||
Mon Dec 3 15:50:33 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* misc/ruby-additional.el (ruby-mode-set-encoding): Unbreak by
|
||||
|
|
|
@ -755,11 +755,14 @@ vm_backtrace_to_ary(rb_thread_t *th, int argc, VALUE *argv, int lev_default, int
|
|||
}
|
||||
case 2:
|
||||
lev = NUM2LONG(level);
|
||||
n = NUM2LONG(vn);
|
||||
if (lev < 0) {
|
||||
rb_raise(rb_eArgError, "negative level (%ld)", lev);
|
||||
}
|
||||
if (n < 0) {
|
||||
rb_raise(rb_eArgError, "negative size (%ld)", n);
|
||||
}
|
||||
lev += lev_plus;
|
||||
n = NUM2LONG(vn);
|
||||
break;
|
||||
default:
|
||||
lev = n = 0; /* to avoid warning */
|
||||
|
|
Loading…
Add table
Reference in a new issue