artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f31ce3c
)
Check pointer for NULL before attempting to deref. None of the existing
author
dtucker
<dtucker@openbsd.org>
Tue, 14 Mar 2023 07:26:25 +0000
(07:26 +0000)
committer
dtucker
<dtucker@openbsd.org>
Tue, 14 Mar 2023 07:26:25 +0000
(07:26 +0000)
callers seem to do that, but it's worth checking. From Coverity CID
291834, ok djm@
usr.bin/ssh/authfile.c
patch
|
blob
|
history
diff --git
a/usr.bin/ssh/authfile.c
b/usr.bin/ssh/authfile.c
index
418e405
..
eb0bded
100644
(file)
--- a/
usr.bin/ssh/authfile.c
+++ b/
usr.bin/ssh/authfile.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: authfile.c,v 1.14
3 2022/06/21 14:52:13 tobhe
Exp $ */
+/* $OpenBSD: authfile.c,v 1.14
4 2023/03/14 07:26:25 dtucker
Exp $ */
/*
* Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
*
@@
-206,6
+206,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;