parse.c has a char array bug. Sometimes it causes a charset problem when Content-Type is us-ascii but message headers include other encoded text like utf-8.
I tried to check out the latest source code from CVS to make patch for CVS, however, the CVS server seemed not to work now. So I made a patch for the bug using a local copy which might be old.
#ifdef HAVE_ICONV
char *orig2,*output2,*output3; - size_t len; + size_t len, charsetlen; orig2=output2=malloc(strlen(string)+1); memset(output2,0,strlen(string)+1); old_output=output;Received on Wed 23 Jan 2008 11:28:05 PM GMT
_at_@ -891,7 +891,9 @@
memcpy(output,output3,len); output += len; free(output3); - memcpy(charsetsave,charset,strlen(charset)<255 ? strlen(charset) : 255); + charsetlen = strlen(charset) < 255 ? strlen(charset) : 255; + memcpy(charsetsave,charset,charsetlen); + charsetsave[charsetlen] = '\0'; #else for (; *ptr; ptr++) { switch (*ptr) {
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:13 AM GMT GMT