1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

mjit.c: make filename in allocated buffer

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-08 02:00:21 +00:00
parent 571bb73410
commit e5f0a4b20b

2
mjit.c
View file

@ -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));