Skip to content

Commit

Permalink
Restore 1.5x with an upper-bounds check.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jul 18, 2014
1 parent a908902 commit 5d3834d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/jruby/util/ByteList.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public ByteList dup(int length) {
*/
public void ensure(int length) {
if (begin + length > bytes.length) {
byte[] tmp = new byte[length];
byte[] tmp = new byte[Math.min(Integer.MAX_VALUE, length + (length >>> 1))];
System.arraycopy(bytes, begin, tmp, 0, realSize);
bytes = tmp;
begin = 0;
Expand Down

0 comments on commit 5d3834d

Please sign in to comment.