mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* file.c (rb_find_file): should not call fpath_check() with NULL.
fixed: [ruby-core:09867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ef05955d2f
commit
61fbdef349
2 changed files with 8 additions and 1 deletions
4
file.c
4
file.c
|
@ -4298,7 +4298,9 @@ rb_find_file(VALUE path)
|
|||
if (!lpath) {
|
||||
return 0; /* no path, no load */
|
||||
}
|
||||
f = dln_find_file(f, lpath);
|
||||
if (!(f = dln_find_file(f, lpath))) {
|
||||
return 0;
|
||||
}
|
||||
if (rb_safe_level() >= 1 && !fpath_check(f)) {
|
||||
rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue