diff options
-rw-r--r-- | ssh-ed25519.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssh-ed25519.c b/ssh-ed25519.c index cb87d4790..9922816c7 100644 --- a/ssh-ed25519.c +++ b/ssh-ed25519.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-ed25519.c,v 1.4 2014/06/24 01:13:21 djm Exp $ */ | 1 | /* $OpenBSD: ssh-ed25519.c,v 1.5 2014/10/14 03:09:59 daniel Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2013 Markus Friedl <markus@openbsd.org> | 3 | * Copyright (c) 2013 Markus Friedl <markus@openbsd.org> |
4 | * | 4 | * |
@@ -128,8 +128,10 @@ ssh_ed25519_verify(const struct sshkey *key, | |||
128 | r = SSH_ERR_INVALID_FORMAT; | 128 | r = SSH_ERR_INVALID_FORMAT; |
129 | goto out; | 129 | goto out; |
130 | } | 130 | } |
131 | if (datalen >= SIZE_MAX - len) | 131 | if (datalen >= SIZE_MAX - len) { |
132 | return SSH_ERR_INVALID_ARGUMENT; | 132 | r = SSH_ERR_INVALID_ARGUMENT; |
133 | goto out; | ||
134 | } | ||
133 | smlen = len + datalen; | 135 | smlen = len + datalen; |
134 | mlen = smlen; | 136 | mlen = smlen; |
135 | if ((sm = malloc(smlen)) == NULL || (m = xmalloc(mlen)) == NULL) { | 137 | if ((sm = malloc(smlen)) == NULL || (m = xmalloc(mlen)) == NULL) { |