From 84216c4e86ab287ea20207f8a25e4a5fe4bfe0bb Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 24 Mar 2003 09:38:37 +0000 Subject: security enhancement of dl library (need test). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 9c5dcb865..f5344815a 100644 --- a/eval.c +++ b/eval.c @@ -139,7 +139,7 @@ rb_secure(level) } void -rb_check_safe_str(x) +rb_check_safe_obj(x) VALUE x; { if (ruby_safe_level > 0 && OBJ_TAINTED(x)){ @@ -152,6 +152,13 @@ rb_check_safe_str(x) } } rb_secure(4); +} + +void +rb_check_safe_str(x) + VALUE x; +{ + rb_check_safe_obj(x); if (TYPE(x)!= T_STRING) { rb_raise(rb_eTypeError, "wrong argument type %s (expected String)", rb_obj_classname(x)); -- cgit