diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/crypt/cryptutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/crypt/cryptutil.c b/src/lib/libc/crypt/cryptutil.c index cadc67af81..ca8be8fa0f 100644 --- a/src/lib/libc/crypt/cryptutil.c +++ b/src/lib/libc/crypt/cryptutil.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cryptutil.c,v 1.4 2014/11/21 12:32:38 schwarze Exp $ */ | 1 | /* $OpenBSD: cryptutil.c,v 1.5 2014/11/24 21:36:35 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
4 | * | 4 | * |
@@ -45,7 +45,7 @@ crypt_checkpass(const char *pass, const char *goodhash) | |||
45 | 45 | ||
46 | /* have to do it the hard way */ | 46 | /* have to do it the hard way */ |
47 | res = crypt(pass, goodhash); | 47 | res = crypt(pass, goodhash); |
48 | if (strlen(res) != strlen(goodhash) || | 48 | if (res == NULL || strlen(res) != strlen(goodhash) || |
49 | timingsafe_bcmp(res, goodhash, strlen(goodhash)) != 0) { | 49 | timingsafe_bcmp(res, goodhash, strlen(goodhash)) != 0) { |
50 | goto fail; | 50 | goto fail; |
51 | } | 51 | } |