mirror of
https://github.com/mautrix/signal.git
synced 2025-03-14 14:15:36 +00:00
signalmeow/attachments: fix splitting stream with chunks over 8192 bytes
This commit is contained in:
parent
0b4d63a62b
commit
15485eb0fd
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue