diff options
author | Daniel Dickman <daniel@cvs.openbsd.org> | 2014-10-14 03:10:00 +0000 |
---|---|---|
committer | Daniel Dickman <daniel@cvs.openbsd.org> | 2014-10-14 03:10:00 +0000 |
commit | 97391d37c3d6cbf2746c696e67d4b6cd36d8d191 (patch) | |
tree | dd3c727d70b34097e867f12bb5fab4da58ae2f86 /usr.bin | |
parent | 38ddd64f447a13727baeade2310cb3df6140df5f (diff) |
plug a memory leak; from Maxime Villard.
ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-ed25519.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-ed25519.c b/usr.bin/ssh/ssh-ed25519.c index 6e0247b7187..205c9a39ccd 100644 --- a/usr.bin/ssh/ssh-ed25519.c +++ b/usr.bin/ssh/ssh-ed25519.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-ed25519.c,v 1.4 2014/06/24 01:13:21 djm Exp $ */ +/* $OpenBSD: ssh-ed25519.c,v 1.5 2014/10/14 03:09:59 daniel Exp $ */ /* * Copyright (c) 2013 Markus Friedl <markus@openbsd.org> * @@ -125,8 +125,10 @@ ssh_ed25519_verify(const struct sshkey *key, r = SSH_ERR_INVALID_FORMAT; goto out; } - if (datalen >= SIZE_MAX - len) - return SSH_ERR_INVALID_ARGUMENT; + if (datalen >= SIZE_MAX - len) { + r = SSH_ERR_INVALID_ARGUMENT; + goto out; + } smlen = len + datalen; mlen = smlen; if ((sm = malloc(smlen)) == NULL || (m = xmalloc(mlen)) == NULL) { |