diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-30 20:24:20 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-30 20:24:20 +0800 |
commit | c48644490f039fb9756b4cd1fedf11fbb1c4a16f (patch) | |
tree | 1e574af895c8702e64bd958b52d20df2a28b1c24 /crypto | |
parent | 54927dc0e0b99009f92fbb7b28d71ae20179ce1e (diff) | |
download | go-tangerine-c48644490f039fb9756b4cd1fedf11fbb1c4a16f.tar.gz go-tangerine-c48644490f039fb9756b4cd1fedf11fbb1c4a16f.tar.zst go-tangerine-c48644490f039fb9756b4cd1fedf11fbb1c4a16f.zip |
Fixed whisper pub key bug
* Unrecoverable messages would cause segfault when recovering invalid
pub key
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/crypto.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go index effa703d0..d56b9112f 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -92,7 +92,7 @@ func ToECDSAPub(pub []byte) *ecdsa.PublicKey { } func FromECDSAPub(pub *ecdsa.PublicKey) []byte { - if pub == nil { + if pub == nil || pub.X == nil || pub.Y == nil { return nil } return elliptic.Marshal(S256(), pub.X, pub.Y) |