Skip to content

Commit bca6626

Browse files
authored
fix: gosec incorrectly warns about accessing signature[64] (#2222)
Incorrectly identifies `[64]` as out-of-bounds access.
1 parent f805900 commit bca6626

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/utilities/siwe/parser.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ func (m *SIWEMessage) VerifySignature(signatureHex string) bool {
219219
copy(signature, sig)
220220

221221
// Normalize V if needed
222+
// #nosec G602
222223
if signature[64] >= 27 {
223-
signature[64] -= 27
224+
signature[64] -= 27 // #nosec G602
224225
}
225226

226227
hash := accounts.TextHash([]byte(m.Raw))

0 commit comments

Comments
 (0)