diff --git a/src/main/java/org/verapdf/parser/SignatureParser.java b/src/main/java/org/verapdf/parser/SignatureParser.java index 3a86917e..1b4142e4 100644 --- a/src/main/java/org/verapdf/parser/SignatureParser.java +++ b/src/main/java/org/verapdf/parser/SignatureParser.java @@ -268,7 +268,7 @@ private boolean isEOFFound(byte[] buffer) throws IOException { long pointer = this.getSource().getOffset(); this.getSource().unread(2); int byteBeforeEOF = this.getSource().peek(); - while (!BaseParser.isLF(byteBeforeEOF)) { + while (!BaseParser.isLF(byteBeforeEOF) && !BaseParser.isCR(byteBeforeEOF)) { this.getSource().unread(); byteBeforeEOF = this.getSource().peek(); if (byteBeforeEOF != CharTable.ASCII_SPACE) {