diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | file.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sun Sep 21 12:19:29 2014 Eric Wong <e@80x24.org> + + * file.c (rb_find_file_ext_safe): clear tmp buffer on failure + (rb_find_file_safe): ditto + Sat Sep 20 04:42:18 2014 Masaki Matsushita <glass.saga@gmail.com> * lib/csv.rb: avoid unnecessary object allocations. @@ -5609,6 +5609,7 @@ rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level) } rb_str_set_len(fname, fnlen); } + rb_str_resize(tmp, 0); RB_GC_GUARD(load_path); return 0; } @@ -5661,6 +5662,7 @@ rb_find_file_safe(VALUE path, int safe_level) if (rb_file_load_ok(f)) goto found; } } + rb_str_resize(tmp, 0); return 0; } else { |