summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 15:26:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 15:26:58 +0000
commit278d90a255d326c55c54dcfb95eaad482a8a3060 (patch)
tree42d1c994667c47f1b9fde371c693c9bf3529887c
parent3ba62bde3604feabbb0c34a77b9b81c6f20b0f42 (diff)
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
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index e34baa2f27..4c4cc324df 100644
--- a/compile.c
+++ b/compile.c
@@ -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;
}