Fixed out of bounds access; fix #3572, ref #3553

parent 5a445f01
......@@ -215,7 +215,7 @@ mrb_ary_slice_bang(mrb_state *mrb, mrb_value self)
}
ptr = a->ptr + i;
for (j = i; j <= a->len - len; ++j) {
for (j = i; j < a->len - len; ++j) {
*ptr = *(ptr+len);
++ptr;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment