Skip to content

Commit 9b2b9fc

Browse files
committed
PDFBOX-6086: avoid IndexOutOfBoundsException
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1929257 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9093d11 commit 9b2b9fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fontbox/src/main/java/org/apache/fontbox/cff/Type1CharStringParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private void processCallSubr(List<byte[]> subrs, List<Object> sequence) throws I
135135
LOG.warn("CALLSUBR is ignored, operand: {}, subrs.size(): {} in glyph '{}' of font {}",
136136
operand, subrs.size(), currentGlyph, fontName);
137137
// remove all parameters (there can be more than one)
138-
while (sequence.get(sequence.size() - 1) instanceof Integer)
138+
while (!sequence.isEmpty() && sequence.get(sequence.size() - 1) instanceof Integer)
139139
{
140140
sequence.remove(sequence.size() - 1);
141141
}

0 commit comments

Comments
 (0)