summaryrefslogtreecommitdiffstats
path: root/include/libssh
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2014-10-05 05:59:54 -0700
committerAndreas Schneider <asn@cryptomilk.org>2014-12-05 10:46:31 +0100
commit5d75090d9fe23c6ef27560de47fc141fc769c6cd (patch)
tree2669fba764d496735f5d025694a609c0f92f7217 /include/libssh
parent32a3cfe6613262cc6e84a0c5cdf9803184e9c2ce (diff)
pki_crypto.c: plug ecdsa_sig->[r,s] bignum leaks
Per ecdsa(3ssl), ECDSA_SIG_new does allocate its 'r' and 's' bignum fields. Fix a bug where the initial 'r' and 's' bignums were being overwritten with newly-allocated bignums, resulting in a memory leak. BUG: https://red.libssh.org/issues/175 Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 4745d652b5e71c27fd891edfe690162c0b8d3005)
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/dh.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libssh/dh.h b/include/libssh/dh.h
index e1039e24..f28b9169 100644
--- a/include/libssh/dh.h
+++ b/include/libssh/dh.h
@@ -49,7 +49,7 @@ int hashbufin_add_cookie(ssh_session session, unsigned char *cookie);
int hashbufout_add_cookie(ssh_session session);
int generate_session_keys(ssh_session session);
bignum make_string_bn(ssh_string string);
+void make_string_bn_inplace(ssh_string string, bignum bnout);
ssh_string make_bignum_string(bignum num);
-
#endif /* DH_H_ */