diff options
author | des <des@FreeBSD.org> | 2016-01-19 18:28:23 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2016-01-19 18:28:23 +0000 |
commit | 7a7bc643b5dd94f6333f2a1d91923165ad77176f (patch) | |
tree | 9d2b367395b2d3c9a63b4aecd1eb28b17b838703 /crypto/openssh/ssh-ed25519.c | |
parent | 834fb5aff44e0a606772591d869016a1d8d9aa95 (diff) | |
parent | 928d872bfcc9d49be194dc51d80555f1bbdbff6b (diff) | |
download | FreeBSD-src-7a7bc643b5dd94f6333f2a1d91923165ad77176f.zip FreeBSD-src-7a7bc643b5dd94f6333f2a1d91923165ad77176f.tar.gz |
Upgrade to OpenSSH 6.8p1.
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; } - |