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 b159ff5e..5163e029 100644
--- a/ssh-ed25519.c
+++ b/ssh-ed25519.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-ed25519.c,v 1.6 2015/01/15 21:38:50 markus Exp $ */
+/* $OpenBSD: ssh-ed25519.c,v 1.7 2016/04/21 06:08:02 djm Exp $ */
/*
* Copyright (c) 2013 Markus Friedl <markus@openbsd.org>
*
@@ -107,7 +107,8 @@ ssh_ed25519_verify(const struct sshkey *key,
if (key == NULL ||
sshkey_type_plain(key->type) != KEY_ED25519 ||
key->ed25519_pk == NULL ||
- datalen >= INT_MAX - crypto_sign_ed25519_BYTES)
+ datalen >= INT_MAX - crypto_sign_ed25519_BYTES ||
+ signature == NULL || signaturelen == 0)
return SSH_ERR_INVALID_ARGUMENT;
if ((b = sshbuf_from(signature, signaturelen)) == NULL)