Skip to content

Commit 84be7aa

Browse files
author
Lucas McDonald
committed
m
1 parent 84fe71d commit 84be7aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/software/amazon/encryption/s3/internal/CipherSubscriber.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public void onNext(ByteBuffer byteBuffer) {
7373
} else {
7474
// Once all content has been read, call onComplete.
7575
// This class can identify when all content has been read because the amount of data read so far
76-
// plus the tag length will equal the content length.
77-
if (contentRead.get() + tagLength == contentLength) {
76+
// plus the tag length exceeds the content length.
77+
if (contentRead.get() + tagLength >= contentLength) {
7878
// All content has been read, so complete the stream.
7979
// The next onNext call MUST include all bytes, including the result of cipher.doFinal().
8080
// Sending any additional onNext calls violates the Reactive Streams specification

0 commit comments

Comments
 (0)