From 4b474b468326dea7380fe0a25393bd037346ffa4 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 30 Nov 2023 19:55:06 +0100 Subject: [PATCH] Backport b0caa95378d4ce3b75f18df784b6c48bf5350c71 Properly feed an EOS token to the push down automata in OpenPgpMessageInputStream.read() --- .../decryption_verification/OpenPgpMessageInputStream.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java index b9ead7e7..dd8cf0e2 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.java @@ -712,6 +712,7 @@ public class OpenPgpMessageInputStream extends DecryptionStream { public int read() throws IOException { if (nestedInputStream == null) { if (packetInputStream != null) { + syntaxVerifier.next(InputSymbol.EndOfSequence); syntaxVerifier.assertValid(); } return -1;