diff --git a/pkg/s3select/progress.go b/pkg/s3select/progress.go index 00d9afd4a..df68163fd 100644 --- a/pkg/s3select/progress.go +++ b/pkg/s3select/progress.go @@ -100,12 +100,13 @@ func newProgressReader(rc io.ReadCloser, compType CompressionType) (*progressRea case noneType: r = scannedReader case gzipType: - if r, err = gzip.NewReader(scannedReader); err != nil { + r, err = gzip.NewReader(scannedReader) + if err != nil { if errors.Is(err, gzip.ErrHeader) || errors.Is(err, gzip.ErrChecksum) { return nil, errInvalidGZIPCompressionFormat(err) } + return nil, errTruncatedInput(err) } - return nil, errTruncatedInput(err) case bzip2Type: r = bzip2.NewReader(scannedReader) default: