Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
only write if the filechunk has len > 0. (#903)
ahrav28983036a06b
diff --git a/pkg/handlers/archive.go b/pkg/handlers/archive.goindex 370bc3998..6faeee123 100644--- a/pkg/handlers/archive.go+++ b/pkg/handlers/archive.go@@ -155,7 +155,9 @@ func (d *Archive) ReadToMax(reader io.Reader) ([]byte, error) {return []byte{}, err}d.size += bRead- fileContent.Write(fileChunk[0:bRead])+ if len(fileChunk) > 0 {+ fileContent.Write(fileChunk[0:bRead])+ }if bRead < 512 {break}