Skip to content

Commit

Permalink
PDFBOX-5713: avoid NPE if .notdef isn't set
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1914019 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Nov 21, 2023
1 parent 3155b9e commit 457f880
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fontbox/src/main/java/org/apache/fontbox/type1/Type1Font.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ public Type1CharString getType1CharString(String name) throws IOException
if (bytes == null)
{
bytes = charstrings.get(".notdef");
if (bytes == null)
{
throw new IOException(".notdef is not defined");
}
}
List<Object> sequence = getParser().parse(bytes, subrs, name);
type1 = new Type1CharString(this, fontName, name, sequence);
Expand Down

0 comments on commit 457f880

Please sign in to comment.