diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-13 20:02:31 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-13 20:02:31 +0000 |
commit | 6f6823bef2200eff07c7adcb32c39bc4a8362568 (patch) | |
tree | 1047e71514bc90865b36b68ef57c002ac467aa10 /io.c | |
parent | 4482f526f80d330bf400ef86ddfb2c54d36d5597 (diff) |
* io.c (rb_f_syscall): Fix buffer overflow with syscall
arguments. [ruby-bugs:PR#8541]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5047,6 +5047,8 @@ rb_f_syscall(argc, 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); |