diff options
author | Jim Miller <millerjv@crd.ge.com> | 2005-01-12 15:11:04 (GMT) |
---|---|---|
committer | Jim Miller <millerjv@crd.ge.com> | 2005-01-12 15:11:04 (GMT) |
commit | 52f7a0cce8d46ea0d2b6b1acdcc472f25bd63d81 (patch) | |
tree | a2ffa386a143779305034f55593542bf89ea7c85 | |
parent | f51a308d7254a2574e10b46aa4d20daeb57cf242 (diff) | |
download | CMake-52f7a0cce8d46ea0d2b6b1acdcc472f25bd63d81.zip CMake-52f7a0cce8d46ea0d2b6b1acdcc472f25bd63d81.tar.gz CMake-52f7a0cce8d46ea0d2b6b1acdcc472f25bd63d81.tar.bz2 |
BUG: encoding 2 bytes into 4 bytes was accessing a 3rd byte from the source
-rw-r--r-- | Source/kwsys/Base64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/Base64.c b/Source/kwsys/Base64.c index 999c3f5..0c5e44f 100644 --- a/Source/kwsys/Base64.c +++ b/Source/kwsys/Base64.c @@ -87,7 +87,7 @@ void kwsysBase64_Encode2(const unsigned char *src, unsigned char *dest) { dest[0] = kwsysBase64EncodeChar((src[0] >> 2) & 0x3F); dest[1] = kwsysBase64EncodeChar(((src[0] << 4) & 0x30)|((src[1] >> 4) & 0x0F)); - dest[2] = kwsysBase64EncodeChar(((src[1] << 2) & 0x3C)|((src[2] >> 6) & 0x03)); + dest[2] = kwsysBase64EncodeChar(((src[1] << 2) & 0x3C)); dest[3] = '='; } |