summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-02-17 09:00:20 +0000
committertedu <tedu@openbsd.org>2014-02-17 09:00:20 +0000
commita8dd92c80a6526f8249eeafd8099a8dfb76640ab (patch)
treeb79ef9fa1367fa20464ec5dc08cdcf5916427e08 /lib/libc
parentsticking strlen into a char leads to wraparound at 256. fix this and (diff)
downloadwireguard-openbsd-a8dd92c80a6526f8249eeafd8099a8dfb76640ab.tar.xz
wireguard-openbsd-a8dd92c80a6526f8249eeafd8099a8dfb76640ab.zip
remove redundant test
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/crypt/bcrypt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c
index 1d7352e3f82..7e283c43f1f 100644
--- a/lib/libc/crypt/bcrypt.c
+++ b/lib/libc/crypt/bcrypt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcrypt.c,v 1.27 2014/02/17 08:58:50 tedu Exp $ */
+/* $OpenBSD: bcrypt.c,v 1.28 2014/02/17 09:00:20 tedu Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -231,8 +231,7 @@ bcrypt(const char *key, const char *salt)
key_len = strlen(key);
if (key_len > 72)
key_len = 72;
- if (minor >= 'a')
- key_len++; /* include the NUL */
+ key_len++; /* include the NUL */
}
/* Setting up S-Boxes and Subkeys */