From 221a008305512fb4a64d126cd491c87b37ad5cce Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 5 Dec 2010 15:41:19 +0100 Subject: [PATCH] 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. --- libcitadel/lib/mime_parser.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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); -- 2.39.2