mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 63006f6f641322058198cd3527f58817b938db43
parent b45b0560d748ff02f525665f590e5cd605f289d3
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Sat, 27 May 2017 17:38:28 +0200

blaze822_mime2231_parameter: fix lookup and parsing of non-2231 fields

Diffstat:
rfc2231.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rfc2231.c b/rfc2231.c @@ -35,7 +35,7 @@ blaze822_mime2231_parameter(char *s, char *name, i = 100; goto found_extended; } - if (blaze822_mime_parameter(s, namenum, &sbuf, &ebuf)) { + if (blaze822_mime_parameter(s, name, &sbuf, &ebuf)) { i = 100; goto found_plain; } @@ -75,11 +75,11 @@ found_extended: } *dst = 0; } else { - namenum[strlen(namenum) - 1] = 0; + namenum[strlen(namenum) - 1] = 0; // strip last * if (blaze822_mime_parameter(s, namenum, &sbuf, &ebuf)) { found_plain: // copy plain - if (dstend - dst < ebuf - sbuf) { + if (ebuf - sbuf < dstend - dst) { memcpy(dst, sbuf, ebuf - sbuf); dst += ebuf - sbuf; }