Module: wine Branch: refs/heads/master Commit: f543aea5e38e97f37b9d6231ebffba9557c182ce URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f543aea5e38e97f37b9d6231...
Author: Kai Blin kai.blin@gmail.com Date: Fri May 26 21:37:07 2006 +0000
secur32: Fix wrong bit shift in the base64 encoder.
Thanks to Juan Lang for catching this one.
---
dlls/secur32/base64_codec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/secur32/base64_codec.c b/dlls/secur32/base64_codec.c index 4aab838..d09b24d 100644 --- a/dlls/secur32/base64_codec.c +++ b/dlls/secur32/base64_codec.c @@ -72,7 +72,7 @@ SECURITY_STATUS encodeBase64(PBYTE in_bu out_buf[i + 1] = b64[ ((d[0] << 4) & 0x30) | (d[1] >> 4 & 0x0f)]; /* third char is the last 4 bits of the second byte padded with * two zeroes */ - out_buf[i + 2] = b64[ ((d[1] >> 4) & 0x3c) ]; + out_buf[i + 2] = b64[ ((d[1] << 2) & 0x3c) ]; /* fourth char is a = to indicate one byte of padding */ out_buf[i + 3] = '='; out_buf[i + 4] = 0;