diff options
| author | 2014-02-03 23:28:00 +0000 | |
|---|---|---|
| committer | 2014-02-03 23:28:00 +0000 | |
| commit | 08156981512895587285699c59b3913ff64f5e2a (patch) | |
| tree | b74a4a6f9330bd198cdc86e8d7d1e4af21f6dc87 /usr.bin/ssh/ssh-ecdsa.c | |
| parent | Check if the device is being detached when returning from tsleep() and (diff) | |
| download | wireguard-openbsd-08156981512895587285699c59b3913ff64f5e2a.tar.xz wireguard-openbsd-08156981512895587285699c59b3913ff64f5e2a.zip | |
fix memory leak; ECDSA_SIG_new() allocates 'r' and 's' for us, unlike
DSA_SIG_new. Reported by Batz Spear; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-ecdsa.c')
| -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); |
