diff options
author | Wim <wim@42.be> | 2022-04-12 00:30:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 00:30:21 +0200 |
commit | 281ef53e7de5d30114dbf57a4b506b2d8d2720cc (patch) | |
tree | 5fe13b85ffe312053452e0d7107ca4b174a412e0 /vendor/github.com/klauspost/compress/zstd/bitreader.go | |
parent | f044b948e257814e8e1f70d4b66821bfd9c2ff06 (diff) | |
download | matterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.tar.gz matterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.tar.bz2 matterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.zip |
Update dependencies (#1800)
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/bitreader.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/zstd/bitreader.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/bitreader.go b/vendor/github.com/klauspost/compress/zstd/bitreader.go index 753d17df..d7cd15ba 100644 --- a/vendor/github.com/klauspost/compress/zstd/bitreader.go +++ b/vendor/github.com/klauspost/compress/zstd/bitreader.go @@ -7,6 +7,7 @@ package zstd import ( "encoding/binary" "errors" + "fmt" "io" "math/bits" ) @@ -132,6 +133,9 @@ func (b *bitReader) remain() uint { func (b *bitReader) close() error { // Release reference. b.in = nil + if !b.finished() { + return fmt.Errorf("%d extra bits on block, should be 0", b.remain()) + } if b.bitsRead > 64 { return io.ErrUnexpectedEOF } |