summaryrefslogtreecommitdiff
path: root/ssh-ed25519.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-04-21 06:08:02 +0000
committerDamien Miller <djm@mindrot.org>2016-04-21 16:30:11 +1000
commitb6e0140a5aa883c27b98415bd8aa9f65fc04ee22 (patch)
tree1a7e85eafbe333ad5fc5a385f03161b51b00d4c9 /ssh-ed25519.c
parent6aaabc2b610e44bae473457ad9556ffb43d90ee3 (diff)
upstream commit
make argument == NULL tests more consistent Upstream-ID: dc4816678704aa5cbda3a702e0fa2033ff04581d
Diffstat (limited to 'ssh-ed25519.c')
-rw-r--r--ssh-ed25519.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh-ed25519.c b/ssh-ed25519.c
index b159ff5ee..5163e0297 100644
--- a/ssh-ed25519.c
+++ b/ssh-ed25519.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-ed25519.c,v 1.6 2015/01/15 21:38:50 markus Exp $ */ 1/* $OpenBSD: ssh-ed25519.c,v 1.7 2016/04/21 06:08:02 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2013 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2013 Markus Friedl <markus@openbsd.org>
4 * 4 *
@@ -107,7 +107,8 @@ ssh_ed25519_verify(const struct sshkey *key,
107 if (key == NULL || 107 if (key == NULL ||
108 sshkey_type_plain(key->type) != KEY_ED25519 || 108 sshkey_type_plain(key->type) != KEY_ED25519 ||
109 key->ed25519_pk == NULL || 109 key->ed25519_pk == NULL ||
110 datalen >= INT_MAX - crypto_sign_ed25519_BYTES) 110 datalen >= INT_MAX - crypto_sign_ed25519_BYTES ||
111 signature == NULL || signaturelen == 0)
111 return SSH_ERR_INVALID_ARGUMENT; 112 return SSH_ERR_INVALID_ARGUMENT;
112 113
113 if ((b = sshbuf_from(signature, signaturelen)) == NULL) 114 if ((b = sshbuf_from(signature, signaturelen)) == NULL)