diff options
-rw-r--r-- | src/crypto/dsa/dsa.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/dsa/dsa.go b/src/crypto/dsa/dsa.go index 575314b1b4..2fc4f1f05b 100644 --- a/src/crypto/dsa/dsa.go +++ b/src/crypto/dsa/dsa.go @@ -279,6 +279,9 @@ func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool { } w := new(big.Int).ModInverse(s, pub.Q) + if w == nil { + return false + } n := pub.Q.BitLen() if n&7 != 0 { |