From b7f95a5a9fcdaac49772e02ae2fe956fbd21ff23 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Tue, 13 Aug 2024 13:35:45 +0800 Subject: [PATCH] sm2: typo --- sm2/sm2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sm2/sm2.go b/sm2/sm2.go index 642ed9a..94d8efc 100644 --- a/sm2/sm2.go +++ b/sm2/sm2.go @@ -762,7 +762,7 @@ func RecoverPublicKeysFromSM2Signature(hash, sig []byte) ([]*ecdsa.PublicKey, er pointRx = append(pointRx, s) } pubs := make([]*ecdsa.PublicKey, 0, 4) - bytes := make([]byte, len(32)+1) + bytes := make([]byte, 32+1) compressFlags := []byte{compressed02, compressed03} // Rx has one or two possible values, so point R has two or four possible values for _, x := range pointRx {