зеркало из https://github.com/github/ruby.git
Check the argument size
Ensure that argument array size does not overflow as `int`, before cast in thread_do_start after new thread created.
This commit is contained in:
Родитель
3b9cdc59ce
Коммит
876c5fe1b2
1
thread.c
1
thread.c
|
@ -842,6 +842,7 @@ thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(void *))
|
|||
th->invoke_arg.func.arg = (void *)args;
|
||||
}
|
||||
else {
|
||||
(void)RARRAY_LENINT(args);
|
||||
th->invoke_type = thread_invoke_type_proc;
|
||||
th->invoke_arg.proc.proc = rb_block_proc();
|
||||
th->invoke_arg.proc.args = args;
|
||||
|
|
Загрузка…
Ссылка в новой задаче