mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-13 09:47:50 +08:00
chore: Appease gosec linter (#5777)
These happen to be harmless memory aliasing but I guess the linter can't know that and we can't really prove it in general.
This commit is contained in:
@@ -58,7 +58,8 @@ nextChoice:
|
||||
if len(p.SerialNumber) > 0 {
|
||||
var found bool
|
||||
for _, sn := range p.SerialNumber {
|
||||
if cert.Leaf.SerialNumber.Cmp(&sn.Int) == 0 {
|
||||
snInt := sn.Int // avoid taking address of iteration variable (gosec warning)
|
||||
if cert.Leaf.SerialNumber.Cmp(&snInt) == 0 {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user