diff options
author | bluhm <> | 2015-05-13 21:01:54 +0000 |
---|---|---|
committer | bluhm <> | 2015-05-13 21:01:54 +0000 |
commit | 8e6b6e9a475e1dc36b40779a796041d17cbff6c2 (patch) | |
tree | 1955aebeef49f084febcb0c497696e6f29e3d867 /src/lib/libc/crypt | |
parent | 351d7b0232be6cd30b048d50d78ccd16a538522e (diff) | |
download | openbsd-8e6b6e9a475e1dc36b40779a796041d17cbff6c2.tar.gz openbsd-8e6b6e9a475e1dc36b40779a796041d17cbff6c2.tar.bz2 openbsd-8e6b6e9a475e1dc36b40779a796041d17cbff6c2.zip |
If crypt(3) is called with an unknown setting, return NULL instead
of some undefined value.
OK tedu@
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r-- | src/lib/libc/crypt/crypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/crypt/crypt.c b/src/lib/libc/crypt/crypt.c index c61f360a59..76e02c235a 100644 --- a/src/lib/libc/crypt/crypt.c +++ b/src/lib/libc/crypt/crypt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypt.c,v 1.27 2015/04/06 20:49:41 tedu Exp $ */ | 1 | /* $OpenBSD: crypt.c,v 1.28 2015/05/13 21:01:54 bluhm Exp $ */ |
2 | 2 | ||
3 | #include <pwd.h> | 3 | #include <pwd.h> |
4 | 4 | ||
@@ -13,4 +13,6 @@ crypt(const char *key, const char *setting) | |||
13 | return (NULL); | 13 | return (NULL); |
14 | } | 14 | } |
15 | } | 15 | } |
16 | |||
17 | return (NULL); | ||
16 | } | 18 | } |