Skip to content

Commit

Permalink
fix: untar file error (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengqi authored Sep 6, 2023
1 parent a3c204a commit efaeaea
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 efaeaea

Please sign in to comment.