From: Wilfried Goesgens Date: Sun, 5 Dec 2010 14:41:19 +0000 (+0100) Subject: Don't put a static buffer into content_encoding; its changed inside. X-Git-Tag: v8.01~541 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=221a008305512fb4a64d126cd491c87b37ad5cce;hp=c066a7a85daf4425d827830830d1ae836d4c03a1;p=citadel.git Don't put a static buffer into content_encoding; its changed inside. - while decoding thats overwritten. probably a bug sleeping in here waiting for its discovery for a long time. --- diff --git a/libcitadel/lib/mime_parser.c b/libcitadel/lib/mime_parser.c index aa029b455..e3d04bb01 100644 --- a/libcitadel/lib/mime_parser.c +++ b/libcitadel/lib/mime_parser.c @@ -254,9 +254,20 @@ void mime_decode(char *partnum, } if (bytes_decoded > 0) if (CallBack != NULL) { - CallBack(name, filename, fixed_partnum(partnum), - disposition, decoded, - content_type, charset, bytes_decoded, "binary", id, userdata); + char encoding_buf[SIZ]; + + strcpy(encoding_buf, "binary"); + CallBack(name, + filename, + fixed_partnum(partnum), + disposition, + decoded, + content_type, + charset, + bytes_decoded, + encoding_buf, + id, + userdata); } free(decoded);