summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/auth.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-03-19 15:31:47 +0000
committermarkus <markus@openbsd.org>2002-03-19 15:31:47 +0000
commit448ad0b1b3d2d54d2d745049a173a39712f23d5a (patch)
tree5c9bdc24466af2881d90445282032cab56650b59 /usr.bin/ssh/auth.c
parentwe don't need mbstate_t, _BSD_SUSECONDS_T_ and _BSD_USECONDS_T_ types (diff)
downloadwireguard-openbsd-448ad0b1b3d2d54d2d745049a173a39712f23d5a.tar.xz
wireguard-openbsd-448ad0b1b3d2d54d2d745049a173a39712f23d5a.zip
check for NULL; from provos@
Diffstat (limited to 'usr.bin/ssh/auth.c')
-rw-r--r--usr.bin/ssh/auth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index 028de4801b4..125c16ee8c9 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/auth.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.40 2002/03/19 14:27:39 markus Exp $");
+RCSID("$OpenBSD: auth.c,v 1.41 2002/03/19 15:31:47 markus Exp $");
#include <libgen.h>
@@ -418,5 +418,7 @@ getpwnamallow(const char *user)
auth_close(as);
#endif
#endif
- return (pwcopy(pw));
+ if (pw != NULL)
+ return (pwcopy(pw));
+ return (NULL);
}