Skip to content

Commit

Permalink
PDFBOX-5653: avoid extreme phase start values that freeze jdk8
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1911639 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Aug 14, 2023
1 parent 61b9253 commit 528eb54
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ private Stroke getStroke()
LOG.warn("Miter limit must be >= 1, value " + miterLimit + " is ignored");
miterLimit = 10;
}
phaseStart = Math.max(phaseStart, Short.MAX_VALUE); // PDFBOX-5653
phaseStart = Math.min(phaseStart, Short.MAX_VALUE); // PDFBOX-5653: avoid jdk8 JVM freeze
return new BasicStroke(lineWidth, lineCap, lineJoin,
miterLimit, dashArray, phaseStart);
}
Expand Down

0 comments on commit 528eb54

Please sign in to comment.