From 278d90a255d326c55c54dcfb95eaad482a8a3060 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Dec 2015 15:26:58 +0000 Subject: 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 --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile.c') 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; } -- cgit v1.2.3