compile.c: fix extra_str

* compile.c (iseq_ibf_load_extra_data): fix offset and
  length of extra_str, which is not NUL-terminated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-08 15:26:58 +00:00
parent 3ba62bde36
commit 278d90a255

View File

@ -8284,7 +8284,7 @@ iseq_ibf_load_extra_data(VALUE str)
VALUE extra_str;
ibf_load_setup(load, loader_obj, str);
extra_str = rb_str_new2(load->buff + load->header->extra_size);
extra_str = rb_str_new(load->buff + load->header->size, load->header->extra_size);
RB_GC_GUARD(loader_obj);
return extra_str;
}