diff --git a/fsutil/tar.go b/fsutil/tar.go index 88ef82d..9cba282 100644 --- a/fsutil/tar.go +++ b/fsutil/tar.go @@ -102,10 +102,10 @@ func untar(reader io.Reader, dst string) error { tr := tar.NewReader(reader) for { header, err := tr.Next() - if errors.Is(err, io.EOF) { - break - } if err != nil { + if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { + break + } return err } // Zip Slip Vulnerability