Skip to content

Commit

Permalink
fix(internal/utils): cap tar extraction size
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dellaluce <[email protected]>
  • Loading branch information
jasondellaluce authored and poiana committed Jun 12, 2023
1 parent fa66777 commit cc49e6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/utils/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func ExtractTarGz(gzipStream io.Reader, destDir string) ([]string, error) {
if err != nil {
return nil, err
}
if written, err := io.Copy(outFile, tarReader); err != nil {
if written, err := io.CopyN(outFile, tarReader, header.Size); err != nil {
return nil, err
} else if written != header.Size {
return nil, io.ErrShortWrite
Expand Down

0 comments on commit cc49e6c

Please sign in to comment.