From 938b830abadd2a9dd4260bea3636e188f925959e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 3 Nov 2013 17:09:33 -0600 Subject: Fix off by one, pointed out by Ashwini Sharma. --- lib/password.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/password.c b/lib/password.c index 6e8f0554..34abf6e7 100644 --- a/lib/password.c +++ b/lib/password.c @@ -41,8 +41,8 @@ int get_salt(char *salt, char *algo) bits = ((buf[i]+(buf[i+1]<<8)) >> (bitpos&7)) & 0x3f; bits += 46; - if (bits > 57) bits += 8; - if (bits > 90) bits += 7; + if (bits > 57) bits += 7; + if (bits > 90) bits += 6; salt[i] = bits; } -- cgit v1.2.3