summaryrefslogtreecommitdiffstats
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
commitadbef8818ff3f4a0d27c411cc06372f69a000f6f (patch)
tree48d81958625eddb0cf310b72d927a2d3c925d742
parent9b9abb145ab1483b56ee7fea8a26881bc8e3646e (diff)
downloadruby-adbef8818ff3f4a0d27c411cc06372f69a000f6f.tar.gz
ruby-adbef8818ff3f4a0d27c411cc06372f69a000f6f.tar.xz
ruby-adbef8818ff3f4a0d27c411cc06372f69a000f6f.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/branches/ruby_1_8@11519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--file.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c66486dc..a98a39f57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jan 9 17:45:17 2007 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * file.c (rb_find_file): should not call fpath_check() with NULL.
+ fixed: [ruby-core:09867]
+
Tue Jan 9 03:54:38 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_upto): String#upto from empty string makes
diff --git a/file.c b/file.c
index 428a9e90a..f36ed235a 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);
}