diff options
author | Rob Landley <rob@landley.net> | 2013-11-03 17:09:33 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-11-03 17:09:33 -0600 |
commit | 938b830abadd2a9dd4260bea3636e188f925959e (patch) | |
tree | f7bd7bd38b0816fc440e246a28e295919c508a64 | |
parent | 599a13b177962615fa4a2de9c30f169659831307 (diff) | |
download | toybox-938b830abadd2a9dd4260bea3636e188f925959e.tar.gz |
Fix off by one, pointed out by Ashwini Sharma.
-rw-r--r-- | lib/password.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |