[#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 <leonard@nspcc.ru>
remotes/fyrchik/meta-pebble
Leonard Lyubich 2021-09-24 14:14:51 +03:00 committed by Alex Vanin
parent 3e5c7e0ade
commit 264ab489bb
1 changed files with 3 additions and 2 deletions

View File

@ -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