diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-13 06:21:47 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-13 06:21:47 +0000 |
commit | 438c4a6fdc5044cdf8f3b43684343a1de0d3efc2 (patch) | |
tree | 6d660a34df038d0fbad19ff04f5b4e126731b653 /io.c | |
parent | 81737565b1b3389013abbd49c05152e5c05b365a (diff) | |
download | ruby-438c4a6fdc5044cdf8f3b43684343a1de0d3efc2.tar.gz |
* 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@11711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5046,6 +5046,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); |