diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-19 15:31:48 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-19 15:31:48 +0000 |
commit | 5401918ec5c01d0e5ce0213ccfba3b3425337185 (patch) | |
tree | 6c9aee8b845c9f8c18d5e33a460d2c26e25f4104 /usr.bin/ssh | |
parent | ea90a20dbcb3b0b30a5f072fa06c05e204e19b24 (diff) |
check for NULL; from provos@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/auth.c | 6 |
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); } |