diff options
author | Brad King <brad.king@kitware.com> | 2023-08-01 17:58:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-08-01 17:58:24 (GMT) |
commit | 188c065e5a447e4c659426e0c27051928c8adb6e (patch) | |
tree | 91af173dfc4e42b50510e998778aa4886d68faeb /Utilities/cmcurl/lib/mime.c | |
parent | 1345c21275574dd66f7adadc9123682488856ba1 (diff) | |
parent | e2ab2da70a2b390eb9067d45dfa47023b00c5cd7 (diff) | |
download | CMake-188c065e5a447e4c659426e0c27051928c8adb6e.zip CMake-188c065e5a447e4c659426e0c27051928c8adb6e.tar.gz CMake-188c065e5a447e4c659426e0c27051928c8adb6e.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2023-07-26 (50490c06)
Diffstat (limited to 'Utilities/cmcurl/lib/mime.c')
-rw-r--r-- | Utilities/cmcurl/lib/mime.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Utilities/cmcurl/lib/mime.c b/Utilities/cmcurl/lib/mime.c index 39aac8f..0a57e1e 100644 --- a/Utilities/cmcurl/lib/mime.c +++ b/Utilities/cmcurl/lib/mime.c @@ -84,7 +84,7 @@ static const struct mime_encoder encoders[] = { }; /* Base64 encoding table */ -static const char base64[] = +static const char base64enc[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* Quoted-printable character class table. @@ -469,10 +469,10 @@ static size_t encoder_base64_read(char *buffer, size_t size, bool ateof, i = st->buf[st->bufbeg++] & 0xFF; i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF); i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF); - *ptr++ = base64[(i >> 18) & 0x3F]; - *ptr++ = base64[(i >> 12) & 0x3F]; - *ptr++ = base64[(i >> 6) & 0x3F]; - *ptr++ = base64[i & 0x3F]; + *ptr++ = base64enc[(i >> 18) & 0x3F]; + *ptr++ = base64enc[(i >> 12) & 0x3F]; + *ptr++ = base64enc[(i >> 6) & 0x3F]; + *ptr++ = base64enc[i & 0x3F]; cursize += 4; st->pos += 4; size -= 4; @@ -496,10 +496,10 @@ static size_t encoder_base64_read(char *buffer, size_t size, bool ateof, i = (st->buf[st->bufbeg + 1] & 0xFF) << 8; i |= (st->buf[st->bufbeg] & 0xFF) << 16; - ptr[0] = base64[(i >> 18) & 0x3F]; - ptr[1] = base64[(i >> 12) & 0x3F]; + ptr[0] = base64enc[(i >> 18) & 0x3F]; + ptr[1] = base64enc[(i >> 12) & 0x3F]; if(++st->bufbeg != st->bufend) { - ptr[2] = base64[(i >> 6) & 0x3F]; + ptr[2] = base64enc[(i >> 6) & 0x3F]; st->bufbeg++; } cursize += 4; |