Skip to content

Commit

Permalink
Revert "zstd: Reject empty compressed blocks (#862)" (#865)
Browse files Browse the repository at this point in the history
This reverts commit 6125c11.

This was unintended and is fixed on last zstd version.
  • Loading branch information
klauspost authored Sep 25, 2023
1 parent 6125c11 commit c634b49
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions zstd/blockdec.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ func (b *blockDec) decodeCompressed(hist *history) error {
return err
}
if hist.decoders.nSeqs == 0 {
if len(hist.decoders.literals) == 0 {
return errors.New("invalid block: no literals nor sequences found")
}
b.dst = append(b.dst, hist.decoders.literals...)
return nil
}
Expand Down
Binary file modified zstd/testdata/good.zip
Binary file not shown.

0 comments on commit c634b49

Please sign in to comment.