summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-09 08:50:04 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-09 08:50:04 +0000
commitd5fab3a6db814cbccda4b0ac522f6e7b5c741d77 (patch)
tree6c37cd0195e4bd13aef078915b7f58acffa8c60f /file.c
parent7d4ca205b89bcbfa5423315f492ee91c6438aa8a (diff)
downloadruby-d5fab3a6db814cbccda4b0ac522f6e7b5c741d77.tar.gz
ruby-d5fab3a6db814cbccda4b0ac522f6e7b5c741d77.tar.xz
ruby-d5fab3a6db814cbccda4b0ac522f6e7b5c741d77.zip
* file.c (rb_find_file): should not call fpath_check() with NULL.
fixed: [ruby-core:09867] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index c8b1e1b0b..b71b0e958 100644
--- a/file.c
+++ b/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);
}