mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-16 12:27:24 +00:00
Catch NullPointerException from bouncy castle signature verification. This can be triggered by a specially crafted signature. Thanks to Sergio Damian Lerner for finding this.
This commit is contained in:
@@ -326,6 +326,9 @@ public class ECKey implements Serializable {
|
||||
return signer.verifySignature(data, r.getPositiveValue(), s.getPositiveValue());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (NullPointerException e) {
|
||||
// Bug in BouncyCastle can cause this for invalid signatures.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user