diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2014-02-03 23:28:01 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2014-02-03 23:28:01 +0000 |
commit | 2148e48ed83cb959e8fbf3877655563f4ee66a57 (patch) | |
tree | c3675e10788397422aa222803cdb665936443e78 | |
parent | 4dcef1885ede5e03bf20c4dad25f2c8651f514fd (diff) |
fix memory leak; ECDSA_SIG_new() allocates 'r' and 's' for us, unlike
DSA_SIG_new. Reported by Batz Spear; ok markus@
-rw-r--r-- | usr.bin/ssh/ssh-ecdsa.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-ecdsa.c b/usr.bin/ssh/ssh-ecdsa.c index 41c2ea63b7f..62baf1e7982 100644 --- a/usr.bin/ssh/ssh-ecdsa.c +++ b/usr.bin/ssh/ssh-ecdsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-ecdsa.c,v 1.9 2014/02/02 03:44:31 djm Exp $ */ +/* $OpenBSD: ssh-ecdsa.c,v 1.10 2014/02/03 23:28:00 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2010 Damien Miller. All rights reserved. @@ -136,9 +136,6 @@ ssh_ecdsa_verify(const Key *key, const u_char *signature, u_int signaturelen, /* parse signature */ if ((sig = ECDSA_SIG_new()) == NULL) fatal("%s: ECDSA_SIG_new failed", __func__); - if ((sig->r = BN_new()) == NULL || - (sig->s = BN_new()) == NULL) - fatal("%s: BN_new failed", __func__); buffer_init(&bb); buffer_append(&bb, sigblob, len); |