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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-02 20:32:11 +09:00
parent 5a445f012e
commit 5d00e85314
+1 -1
View File
@@ -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;
}