From c48644490f039fb9756b4cd1fedf11fbb1c4a16f Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 30 Jan 2015 13:24:20 +0100 Subject: Fixed whisper pub key bug * Unrecoverable messages would cause segfault when recovering invalid pub key --- crypto/crypto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto') 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) -- cgit ='https://www.csie.ntu.edu.tw/~b01902062/git/freebsd-ports' title='freebsd-ports Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Various patches (mainly shared library revision changes) for thoseAde Lovett2001-05-051-2/+1
* -pthread --> ${PTHREAD_LIBS}Maxim Sobolev2001-03-301-1/+1
* Style fixes for sysutils.Jimmy Olgeni2001-02-061-1/+1
* Update to 1.0.1.Maxim Sobolev2001-01-102-2/+2
* Whitespace-only:Maxim Sobolev2000-11-011-2/+2
* Implement USE_GNOME, part 2.Jeremy Lea2000-10-05