chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
614c3bb
)
pubkey.c (RSAPriv): Fix segfault if `p' is provided but not `q'.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 15 Nov 2019 13:30:43 +0000
(13:30 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Nov 2019 22:18:12 +0000
(22:18 +0000)
Stupid typo.
pubkey.c
patch
|
blob
|
blame
|
history
diff --git
a/pubkey.c
b/pubkey.c
index 77f0b93578a7d4166f8822b11edfa00df71547e5..0abb011b82d705329767b108874ee05aa5bbdcd1 100644
(file)
--- a/
pubkey.c
+++ b/
pubkey.c
@@
-649,7
+649,7
@@
static PyObject *rsapriv_pynew(PyTypeObject *ty,
goto end;
if ((rp.n && !MP_ODDP(rp.n)) ||
(rp.p && !MP_ODDP(rp.p)) ||
goto end;
if ((rp.n && !MP_ODDP(rp.n)) ||
(rp.p && !MP_ODDP(rp.p)) ||
- (rp.
p
&& !MP_ODDP(rp.q)))
+ (rp.
q
&& !MP_ODDP(rp.q)))
VALERR("RSA modulus and factors must be odd");
if (rsa_recover(&rp)) VALERR("couldn't construct private key");
if (rng != Py_None && !GRAND_PYCHECK(rng))
VALERR("RSA modulus and factors must be odd");
if (rsa_recover(&rp)) VALERR("couldn't construct private key");
if (rng != Py_None && !GRAND_PYCHECK(rng))