Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
else if (!strcasecmp("b", encoding)) {
/* base64 decoding */
int len;
size_t charsetlen;
#ifdef HAVE_ICONV
size_t tmplen;
char *output2;
Expand All @@ -926,7 +927,9 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave)
memcpy(output,output2,tmplen);
output += tmplen;
free(output2);
memcpy(charsetsave,charset,strlen(charset)<255 ? strlen(charset) : 255 );
charsetlen = strlen(charset) < 255 ? strlen(charset) : 255;
memcpy(charsetsave,charset,charsetlen);
charsetsave[charsetlen] = '\0';
#else
base64Decode(ptr, output, &len);
output += len;
Expand Down