зеркало из https://github.com/github/ruby.git
readline.c: $SAFE 4
* ext/readline/readline.c (readline_s_delete_text): call rb_secure only if level 4 is allowed. otherwise do nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0780974482
Коммит
39b5931d74
|
@ -578,7 +578,9 @@ readline_s_insert_text(VALUE self, VALUE str)
|
|||
static VALUE
|
||||
readline_s_delete_text(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
rb_secure(RUBY_SAFE_LEVEL_MAX);
|
||||
#if RUBY_SAFE_LEVEL_MAX >= 4
|
||||
rb_secure(4);
|
||||
#endif
|
||||
rb_check_arity(argc, 0, 2);
|
||||
if (rl_line_buffer) {
|
||||
char *p, *ptr = rl_line_buffer;
|
||||
|
|
Загрузка…
Ссылка в новой задаче