summaryrefslogtreecommitdiffstats
path: root/lib/libc/crypt/crypt.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-05-13 21:01:54 +0000
committerbluhm <bluhm@openbsd.org>2015-05-13 21:01:54 +0000
commit66b2da51102769636e129a19b610a25518325806 (patch)
tree7a084dd6c2368caec692382e9e3e14159b0c7b1b /lib/libc/crypt/crypt.c
parenttest mbuf pointers against NULL not 0 (diff)
downloadwireguard-openbsd-66b2da51102769636e129a19b610a25518325806.tar.xz
wireguard-openbsd-66b2da51102769636e129a19b610a25518325806.zip
If crypt(3) is called with an unknown setting, return NULL instead
of some undefined value. OK tedu@
Diffstat (limited to 'lib/libc/crypt/crypt.c')
-rw-r--r--lib/libc/crypt/crypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/crypt/crypt.c b/lib/libc/crypt/crypt.c
index c61f360a59e..76e02c235aa 100644
--- a/lib/libc/crypt/crypt.c
+++ b/lib/libc/crypt/crypt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypt.c,v 1.27 2015/04/06 20:49:41 tedu Exp $ */
+/* $OpenBSD: crypt.c,v 1.28 2015/05/13 21:01:54 bluhm Exp $ */
#include <pwd.h>
@@ -13,4 +13,6 @@ crypt(const char *key, const char *setting)
return (NULL);
}
}
+
+ return (NULL);
}