Skip to content

Commit

Permalink
fix: untar file error
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengqi committed Sep 6, 2023
1 parent a3c204a commit 29aba43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fsutil/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29aba43

Please sign in to comment.