summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <millerjv@crd.ge.com>2005-01-12 15:11:04 (GMT)
committerJim Miller <millerjv@crd.ge.com>2005-01-12 15:11:04 (GMT)
commit52f7a0cce8d46ea0d2b6b1acdcc472f25bd63d81 (patch)
treea2ffa386a143779305034f55593542bf89ea7c85
parentf51a308d7254a2574e10b46aa4d20daeb57cf242 (diff)
downloadCMake-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.c2
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] = '=';
}