changeset 1107:bbed38cf7236

Fix off by one, pointed out by Ashwini Sharma.
author Rob Landley <rob@landley.net>
date Sun, 03 Nov 2013 17:09:33 -0600
parents 30a210bae3e9
children fb8467436e6a
files lib/password.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/password.c	Sat Nov 02 15:10:55 2013 -0500
+++ b/lib/password.c	Sun Nov 03 17:09:33 2013 -0600
@@ -41,8 +41,8 @@
 
     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;
   }