summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-09 08:48:03 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-09 08:48:03 +0000
commitd158c316839252f07519ffc9448614fc4b7a3588 (patch)
tree48d81958625eddb0cf310b72d927a2d3c925d742 /file.c
parent76563bb82f9755b78f205b216e30cc3b5e9612a9 (diff)
* 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/branches/ruby_1_8@11519 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 428a9e9..f36ed23 100644
--- a/file.c
+++ b/file.c
@@ -4341,7 +4341,9 @@ rb_find_file(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);
}