From e5f0a4b20bc89d46ef61fa8ed4a95159853fed4d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 8 Feb 2018 02:00:21 +0000 Subject: [PATCH] mjit.c: make filename in allocated buffer git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- mjit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mjit.c b/mjit.c index 60359b34ad..ba4da6b416 100644 --- a/mjit.c +++ b/mjit.c @@ -757,7 +757,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit) if (c_file_len >= (int)sizeof(c_file_buff)) { ++c_file_len; c_file = alloca(c_file_len); - c_file_len = sprint_uniq_filename(c_file_buff, c_file_len, unit->id, MJIT_TMP_PREFIX, c_ext); + c_file_len = sprint_uniq_filename(c_file, c_file_len, unit->id, MJIT_TMP_PREFIX, c_ext); } ++c_file_len; so_file = alloca(c_file_len - sizeof(c_ext) + sizeof(so_ext));