From adbef8818ff3f4a0d27c411cc06372f69a000f6f Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 9 Jan 2007 08:48:03 +0000 Subject: * 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 --- file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'file.c') 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); } -- cgit