~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba6c138
)
pub/rsa-recover.c: Fail gracefully if `mpmont_create' fails.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 22 Dec 2014 20:32:58 +0000
(20:32 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 6 Feb 2015 11:02:08 +0000
(11:02 +0000)
Otherwise we'll crash and burn if, e.g., `n' is even for some reason.
pub/rsa-recover.c
patch
|
blob
|
blame
|
history
diff --git
a/pub/rsa-recover.c
b/pub/rsa-recover.c
index
f852f69
..
bc3eda2
100644
(file)
--- a/
pub/rsa-recover.c
+++ b/
pub/rsa-recover.c
@@
-97,7
+97,7
@@
int rsa_recover(rsa_priv *rp)
/* --- Set up for the exponentiation --- */
-
mpmont_create(&mm, rp->n)
;
+
if (mpmont_create(&mm, rp->n)) goto out
;
m1 = mp_sub(m1, rp->n, mm.r);
/* --- Now for the main loop --- *