aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/authfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/authfile.c')
-rw-r--r--crypto/openssh/authfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/openssh/authfile.c b/crypto/openssh/authfile.c
index 9ed4f4c3a30d..445f2dd54198 100644
--- a/crypto/openssh/authfile.c
+++ b/crypto/openssh/authfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfile.c,v 1.143 2022/06/21 14:52:13 tobhe Exp $ */
+/* $OpenBSD: authfile.c,v 1.144 2023/03/14 07:26:25 dtucker Exp $ */
/*
* Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
*
@@ -211,6 +211,8 @@ sshkey_try_load_public(struct sshkey **kp, const char *filename,
int r;
struct sshkey *k = NULL;
+ if (kp == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
*kp = NULL;
if (commentp != NULL)
*commentp = NULL;