diff options
Diffstat (limited to 'crypto/openssh/ssh-ed25519.c')
-rw-r--r-- | crypto/openssh/ssh-ed25519.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/openssh/ssh-ed25519.c b/crypto/openssh/ssh-ed25519.c index cb87d47..b159ff5 100644 --- a/crypto/openssh/ssh-ed25519.c +++ b/crypto/openssh/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.6 2015/01/15 21:38:50 markus Exp $ */ /* * Copyright (c) 2013 Markus Friedl <markus@openbsd.org> * @@ -25,9 +25,8 @@ #include <string.h> #include <stdarg.h> -#include "xmalloc.h" #include "log.h" -#include "buffer.h" +#include "sshbuf.h" #define SSHKEY_INTERNAL #include "sshkey.h" #include "ssherr.h" @@ -128,11 +127,13 @@ 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) { + if ((sm = malloc(smlen)) == NULL || (m = malloc(mlen)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } @@ -163,4 +164,3 @@ ssh_ed25519_verify(const struct sshkey *key, free(ktype); return r; } - |