From b3da2d5e8a4779fc93dfe8750408a60836e15921 Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Wed, 15 May 2019 00:56:15 +0000 Subject: [PATCH] Bug 63431 -- unbug ChunkedCipherInputStream's read() git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1859251 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java b/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java index 40b0e28ddb..5ad77ddd62 100644 --- a/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java +++ b/src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java @@ -82,8 +82,7 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream { @Override public int read() throws IOException { byte[] b = { 0 }; - // FIXME: compare against -1 or 1? (bug 59893) - return (read(b) == 1) ? -1 : b[0]; + return (read(b) == 1) ? b[0] : -1; } // do not implement! -> recursion