Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Use io.CopyBuffer when recomputing checksums (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Aug 17, 2023
1 parent 076e8f4 commit 6d91e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tarball/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (c *Context) writeTar(ctx context.Context, tw *tar.Writer, fsys fs.FS, user
defer data.Close()

fileDigest := sha1.New() //nolint:gosec
if _, err := io.Copy(fileDigest, data); err != nil {
if _, err := io.CopyBuffer(fileDigest, data, buf); err != nil {
return err
}

Expand Down

0 comments on commit 6d91e7d

Please sign in to comment.