1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 02:27:32 -05:00

Fix a few memory leaks.

Mostly noticed in passing while using Address / Leak Sanitiser to
check over the previous commit. One highlight here is freeing of the
previous iqmp value in rsa_verify, which was actually a potentially
sensitive leak, introduced in the mp_int rewrite (commit 25b034ee3).
This commit is contained in:
Simon Tatham
2019-02-28 06:19:31 +00:00
parent d07d7d66f6
commit 3e881a4248
5 changed files with 7 additions and 0 deletions

View File

@ -332,6 +332,7 @@ bool rsa_verify(RSAKey *key)
mp_int *q_new = mp_min(key->p, key->q);
mp_free(key->p);
mp_free(key->q);
mp_free(key->iqmp);
key->p = p_new;
key->q = q_new;
key->iqmp = mp_invert(key->q, key->p);