Skip to content

Commit

Permalink
PDFBOX-5339: improve error message
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1896871 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lehmi committed Jan 10, 2022
1 parent de685b1 commit 1d1924a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void initParserValues(COSStream stream) throws IOException
indexArray.add(COSInteger.ZERO);
indexArray.add(COSInteger.get(stream.getInt(COSName.SIZE, 0)));
}
if (indexArray.size() % 2 == 1)
if (indexArray.size() == 0 || indexArray.size() % 2 == 1)
{
throw new IOException(
"Wrong number of values for /Index array in XRef: " + Arrays.toString(w));
Expand Down

0 comments on commit 1d1924a

Please sign in to comment.