summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 09:38:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-24 09:38:37 +0000
commit84216c4e86ab287ea20207f8a25e4a5fe4bfe0bb (patch)
tree14f984d7ad39dd888fbc20837e8fd6cfd236b20e /eval.c
parent59fa83c2c93c518c99cad60445f25ef3ce76f14e (diff)
downloadruby-84216c4e86ab287ea20207f8a25e4a5fe4bfe0bb.tar.gz
ruby-84216c4e86ab287ea20207f8a25e4a5fe4bfe0bb.tar.xz
ruby-84216c4e86ab287ea20207f8a25e4a5fe4bfe0bb.zip
security enhancement of dl library (need test).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 8 insertions, 1 deletions
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));