diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-07 12:01:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-07 12:01:46 +0000 |
commit | 562185ff5cc2196cb80ea71ecaecf8e7f5c79eb3 (patch) | |
tree | ce1aba50da30918c575849ba6dc8803da7be66d1 | |
parent | 39d35c11307e31434cc71f0412b6ec34c7e3ee69 (diff) |
* eval.c (rb_require_safe): get actual path string under safe level
when requested. fixed: [ruby-dev:25815]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | eval.c | 4 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Mon Mar 7 21:01:37 2005 Nobuyoshi Nakada <[email protected]> + + * eval.c (rb_require_safe): get actual path string under safe level + when requested. fixed: [ruby-dev:25815] + Mon Mar 7 16:46:02 2005 NAKAMURA Usaku <[email protected]> * ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_read, @@ -21,7 +26,7 @@ Mon Mar 7 10:28:00 2005 Yukihiro Matsumoto <[email protected]> Mon Mar 7 01:21:01 2005 Hidetoshi NAGAI <[email protected]> - * ext/tk/tkutil/tkutil.c: follow the change of st.c (committed + * ext/tk/tkutil/tkutil.c: follow the change of st.c (committed at Fri, 4 Mar 2005 15:47:47 +0900 by matz) Mon Mar 7 00:01:55 2005 Hidetoshi NAGAI <[email protected]> @@ -79,7 +84,7 @@ Sat Mar 5 17:48:31 2005 Hirokazu Yamamoto <[email protected]> Sat Mar 5 16:50:00 2005 NARUSE, Yui <[email protected]> - * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.65 + * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.65 Sat Mar 5 16:29:26 2005 Hidetoshi NAGAI <[email protected]> @@ -6857,8 +6857,6 @@ rb_require_safe(fname, safe) } volatile saved; char *volatile ftptr = 0; - FilePathValue(fname); - fname = rb_str_new4(fname); saved.vmode = scope_vmode; saved.node = ruby_current_node; saved.callee = ruby_frame->callee; @@ -6871,6 +6869,8 @@ rb_require_safe(fname, safe) int found; ruby_safe_level = safe; + FilePathValue(fname); + *(volatile VALUE *)&fname = rb_str_new4(fname); found = search_required(fname, &feature, &path); if (found) { if (!path || load_wait(RSTRING(feature)->ptr)) { |