Skip to content

Commit

Permalink
squashfs: close the gz compressor to make sure we read CRC errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Dec 16, 2023
1 parent 11f9a4c commit d105557
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filesystem/squashfs/compressor.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func (c *CompressorGzip) decompress(in []byte) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("error decompressing: %v", err)
}
if err := gz.Close(); err != nil {
return nil, err
}
return p, nil
}

Expand Down

0 comments on commit d105557

Please sign in to comment.