Skip to content

Commit

Permalink
signalmeow/attachments: fix splitting stream with chunks over 8192 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jan 22, 2025
1 parent 0b4d63a commit 15485eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/signalmeow/attachments_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func splitChunksStream(input io.Reader, callback func([]byte) error) error {
continue
}
if msgLen > uint64(len(cachedBuf)) {
cachedBuf = make([]byte, min(msgLen, 8192))
cachedBuf = make([]byte, max(msgLen, 8192))
}
buf := cachedBuf[:msgLen]
_, err = io.ReadFull(input, buf)
Expand Down

0 comments on commit 15485eb

Please sign in to comment.