https://bz.apache.org/bugzilla/show_bug.cgi?id=63431
Bug ID: 63431 Summary: buggy read() in ChunkedCipherInputStream Product: POI Version: 4.0.x-dev Hardware: PC Status: NEW Severity: normal Priority: P2 Component: POIFS Assignee: dev@poi.apache.org Reporter: talli...@apache.org Target Milestone: --- Over on TIKA-2873, we were just hit with this. In ChunkedCipherInputStream, read() is guaranteed to return -1 if there was something in the stream: @Override public int read() throws IOException { byte[] b = \{ 0 }; // FIXME: compare against -1 or 1? (bug 59893) return (read(b) == 1) ? -1 : b[0]; } This is related to 59893...and probably should be: @Override public int read() throws IOException { byte[] b = \{ 0 }; // FIXME: compare against -1 or 1? (bug 59893) return (read(b) == -1) ? -1 : b[0]; } I just made the change and all tests pass...any reason not to fix this? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org