Skip to content

Commit

Permalink
Fix possible OOM caused by invalid use of repeat count on inserts (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 23, 2023
1 parent 8805647 commit 01e96bd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3022,9 +3022,7 @@ void indention(int nb, StringBuilder sb) {
}

protected boolean selfInsert() {
for (int count = this.count; count > 0; count--) {
putString(getLastBinding());
}
putString(getLastBinding());
return true;
}

Expand All @@ -3034,9 +3032,7 @@ protected boolean selfInsertUnmeta() {
if ("\r".equals(s)) {
s = "\n";
}
for (int count = this.count; count > 0; count--) {
putString(s);
}
putString(s);
return true;
} else {
return false;
Expand Down

0 comments on commit 01e96bd

Please sign in to comment.