[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 59/73: mime: limit bas64-encoded lines length to 76
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 59/73: mime: limit bas64-encoded lines length to 76 characters |
Date: |
Tue, 24 Oct 2017 18:54:40 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a8742efe42d72e25a8c5041db35115dbf4fa6c45
Author: Patrick Monnerat <address@hidden>
AuthorDate: Thu Oct 19 18:33:27 2017 +0100
mime: limit bas64-encoded lines length to 76 characters
---
lib/mime.c | 4 ++--
tests/data/test648 | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/mime.c b/lib/mime.c
index c3c370891..d9b7f524e 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -406,7 +406,7 @@ static size_t encoder_base64_read(char *buffer, size_t
size, bool ateof,
while(st->bufbeg < st->bufend) {
/* Line full ? */
- if(st->pos >= MAX_ENCODED_LINE_LENGTH - 4) {
+ if(st->pos > MAX_ENCODED_LINE_LENGTH - 4) {
/* Yes, we need 2 characters for CRLF. */
if(size < 2)
break;
@@ -421,7 +421,7 @@ static size_t encoder_base64_read(char *buffer, size_t
size, bool ateof,
if(size < 4 || st->bufend - st->bufbeg < 3)
break;
- /* Encode three bytes a four characters. */
+ /* Encode three bytes as four characters. */
i = st->buf[st->bufbeg++] & 0xFF;
i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
diff --git a/tests/data/test648 b/tests/data/test648
index cd8f02085..a2b227bcf 100644
--- a/tests/data/test648
+++ b/tests/data/test648
@@ -66,8 +66,8 @@ This is the e-mail inline text with a very long line
containing the special=
Content-Disposition: attachment; filename="test648.txt"
Content-Transfer-Encoding: base64
-VGhpcyBpcyBhbiBhdHRhY2hlZCBmaWxlLgoKSXQgbWF5IGNvbnRhaW4gYW55IHR5cGUgb2Yg
-ZGF0YSBhbmQgd2lsbCBiZSBlbmNvZGVkIGluIGJhc2U2NCBmb3IgdHJhbnNmZXIuCg==
+VGhpcyBpcyBhbiBhdHRhY2hlZCBmaWxlLgoKSXQgbWF5IGNvbnRhaW4gYW55IHR5cGUgb2YgZGF0
+YSBhbmQgd2lsbCBiZSBlbmNvZGVkIGluIGJhc2U2NCBmb3IgdHJhbnNmZXIuCg==
--------------------------------
.
</upload>
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 34/73: CURLOPT_XFERINFODATA.3: fix duplicate see also, (continued)
- [GNUnet-SVN] [gnurl] 34/73: CURLOPT_XFERINFODATA.3: fix duplicate see also, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 46/73: cli tool: use file2memory() to buffer stdin in -F option., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 25/73: mime: refuse to add subparts to one of their own descendants., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 55/73: makefile.m32: allow to override gcc, ar and ranlib, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 50/73: mime: do not call failf() if easy handle is NULL., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 49/73: test651: curl_formadd with huge COPYCONTENTS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 63/73: runtests: support MultiSSL client feature, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 58/73: RELEASE-NOTES: synced with f121575c0, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 65/73: mime: do not reuse previously computed multipart size, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 59/73: mime: limit bas64-encoded lines length to 76 characters,
gnunet <=
- [GNUnet-SVN] [gnurl] 69/73: mk-ca-bundle: Fix URL for NSS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 72/73: RELEASE-NOTES: 7.56.1, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 70/73: mk-ca-bundle: Remove URL for aurora, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 04/73: fuzzer: move to using external curl-fuzzer, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 73/73: Merge tag 'curl-7_56_1' of https://github.com/curl/curl, gnunet, 2017/10/24