summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-03 08:12:57 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-03 08:51:50 +0900
commit14a17063a11a01d518b4bbaf0eb967330aec3984 (patch)
tree5cc6a25e09b593f2bc5a66bef09b35f823075ebd /load.c
parent8bddf1bc9bdd1db7ce2e3fec15f2f06ff355b0a7 (diff)
Fixed stack overflow [Bug #16382]
Get rid of infinite recursion in expanding a load path to the real path while loading a transcoder.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2714
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 7772e746f9..fda100fb1a 100644
--- a/load.c
+++ b/load.c
@@ -79,7 +79,7 @@ rb_construct_expanded_load_path(enum expand_type type, int *has_relative, int *h
if (is_string)
rb_str_freeze(path);
as_str = rb_get_path_check_convert(as_str);
- expanded_path = rb_check_realpath(Qnil, as_str);
+ expanded_path = rb_check_realpath(Qnil, as_str, NULL);
if (NIL_P(expanded_path)) expanded_path = as_str;
rb_ary_push(ary, rb_fstring(expanded_path));
}