Skip to content

Commit 70e93e0

Browse files
fredmnlWilliam
andcommitted
Update lib/auth/streamingV4/trailingChecksumTransform.js
Co-authored-by: William <91462779+williamlardier@users.noreply.github.com>
1 parent 453e6f5 commit 70e93e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/auth/streamingV4/trailingChecksumTransform.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class TrailingChecksumTransform extends Transform {
6666
}
6767

6868
// we are now looking for the chunk size field
69-
// no need to look further than 10 bytes since the field cannot be bigger
69+
// no need to look further than 10 bytes since the field cannot be bigger: the max
70+
// chunk size is 5GB (see constants.maximumAllowedPartSize)
7071
const lineBreakIndex = chunk.subarray(0, 10).indexOf('\r');
7172
const bytesToKeep = lineBreakIndex === -1 ? chunk.byteLength : lineBreakIndex;
7273
if (this.chunkSizeBuffer.byteLength + bytesToKeep > 10) {

0 commit comments

Comments
 (0)