1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
knu 2007-02-13 06:21:47 +00:00
parent 81737565b1
commit 438c4a6fdc
2 changed files with 7 additions and 0 deletions

View file

@ -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]
Sun Feb 11 07:46:45 2007 Akinori MUSHA <knu@iDaemons.org>
* lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse

2
io.c
View file

@ -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);