diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Feb 13 02:21:12 2007 Sam Roberts <sroberts@uniserve.com> + + * io.c (rb_f_syscall): Fix buffer overflow with syscall + arguments. [ruby-bugs:PR#8541] + Mon Feb 12 13:57:30 2007 Masaki Suketa <masaki.suketa@nifty.ne.jp> * ext/win32ole/win32ole.c (ole_variant2val): support VT_I8, VT_UI8. @@ -4980,6 +4980,8 @@ rb_f_syscall(int argc, VALUE *argv) rb_secure(2); if (argc == 0) rb_raise(rb_eArgError, "too few arguments for syscall"); + if (argc > sizeof(arg) / sizeof(arg[0])) + rb_raise(rb_eArgError, "too many arguments for syscall"); arg[0] = NUM2LONG(argv[0]); argv++; while (items--) { VALUE v = rb_check_string_type(*argv); |