From 264ab489bb563fcac5685cefcbc717cb31375318 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 24 Sep 2021 14:14:51 +0300 Subject: [PATCH] [#848] ir/container: Prevent potential NPE in key conversion Set `Curve` field in `ecdsa.PublicKey` instance from `keys.PublicKey` one in `checkKeyOwnership` method of container processor. Signed-off-by: Leonard Lyubich --- pkg/innerring/processors/container/common.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/innerring/processors/container/common.go b/pkg/innerring/processors/container/common.go index 562e780e..5a8bc40a 100644 --- a/pkg/innerring/processors/container/common.go +++ b/pkg/innerring/processors/container/common.go @@ -53,8 +53,9 @@ func (cp *Processor) checkKeyOwnership(ownerIDSrc ownerIDSource, key *keys.Publi // TODO: need more convenient way to do this w, err := owner.NEO3WalletFromPublicKey(&ecdsa.PublicKey{ - X: key.X, - Y: key.Y, + Curve: key.Curve, + X: key.X, + Y: key.Y, }) if err != nil { return err