shithub: furgit

Download patch

ref: f0bdb248330259733c4268345532fba0211f997c
parent: 18c208a6096d1b462965896817d5e3569d7a9231
author: Runxi Yu <me@runxiyu.org>
date: Sun Feb 22 07:27:52 EST 2026

adler32: Use binary.BigEndian to avoid the gosec warning

--- a/internal/adler32/adler32_amd64.go
+++ b/internal/adler32/adler32_amd64.go
@@ -70,8 +70,7 @@
 func (d *digest) Sum32() uint32 { return uint32(*d) }
 
 func (d *digest) Sum(in []byte) []byte {
-	s := uint32(*d)
-	return append(in, byte(s>>24), byte(s>>16), byte(s>>8), byte(s))
+	return binary.BigEndian.AppendUint32(in, uint32(*d))
 }
 
 // Checksum returns the Adler-32 checksum of data.
--