mirror of git://anongit.mindrot.org/openssh.git
upstream: Check pointer for NULL before deref.
None of the existing callers seem to do that, but it's worth checking. From Coverity CID 291834, ok djm@ OpenBSD-Commit-ID: a0a97113f192a7cb1a2c97b932f677f573cda7a4
This commit is contained in:
parent
d95af508e7
commit
1d270bd303
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue