Skip to content

Commit

Permalink
Fixed out of bounds access; fix #3572, ref #3553
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 2, 2017
1 parent 5a445f0 commit 5d00e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrbgems/mruby-array-ext/src/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5d00e85

Please sign in to comment.