From 9e41c4f5cdba62536f5d737240a724dcd13ccee3 Mon Sep 17 00:00:00 2001 From: Maxim Date: Mon, 15 Jul 2024 19:26:21 +0300 Subject: [PATCH] Fix NullPointerException --- src/main/java/org/verapdf/parser/SeekableCOSParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/verapdf/parser/SeekableCOSParser.java b/src/main/java/org/verapdf/parser/SeekableCOSParser.java index c3172f3b..3004c934 100644 --- a/src/main/java/org/verapdf/parser/SeekableCOSParser.java +++ b/src/main/java/org/verapdf/parser/SeekableCOSParser.java @@ -105,7 +105,7 @@ protected COSObject getStream(COSObject dict) throws IOException { long streamStartOffset = getSource().getOffset(); COSObject length = dict.getKey(ASAtom.LENGTH); - if (this.keyOfCurrentObject != null && length.isIndirect() && this.keyOfCurrentObject.equals(length.getKey())) { + if (this.keyOfCurrentObject != null && Boolean.TRUE.equals(length.isIndirect()) && this.keyOfCurrentObject.equals(length.getKey())) { throw new VeraPDFParserException(getErrorMessage("Object has stream length value" + " which references to its own object key")); }