From b0caa95378d4ce3b75f18df784b6c48bf5350c71 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 27 Nov 2023 13:27:23 +0100 Subject: [PATCH] Properly feed an EOS token to the push down automata in OpenPgpMessageInputStream.read() --- .../decryption_verification/OpenPgpMessageInputStream.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt index 5e8b68f2..df67ca0f 100644 --- a/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt +++ b/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt @@ -486,6 +486,7 @@ class OpenPgpMessageInputStream( override fun read(): Int { if (nestedInputStream == null) { if (packetInputStream != null) { + syntaxVerifier.next(InputSymbol.END_OF_SEQUENCE) syntaxVerifier.assertValid() } return -1