diff --git a/crypto/test/tests.go b/crypto/test/tests.go index 94f1360d..46b9b069 100644 --- a/crypto/test/tests.go +++ b/crypto/test/tests.go @@ -52,7 +52,7 @@ func FailSigner(s neofscrypto.Signer) neofscrypto.Signer { // Signature returns random neofscrypto.Signature. func Signature() neofscrypto.Signature { - sig := make([]byte, rand.Int()%128) + sig := make([]byte, 1+rand.Int()%128) //nolint:staticcheck // cryptorandom is not required for testing rand.Read(sig) return neofscrypto.NewSignature(neofscrypto.Scheme(rand.Uint32()%3), Signer().Public(), sig)