Don't put a static buffer into content_encoding; its changed inside.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Dec 2010 14:41:19 +0000 (15:41 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Dec 2010 14:41:19 +0000 (15:41 +0100)
 - while decoding thats overwritten. probably a bug sleeping in here waiting for its discovery for a long time.

libcitadel/lib/mime_parser.c

index aa029b455581ea78e29fb56ab492fb96791a721a..e3d04bb0123e24591740c280a61303249084f0df 100644 (file)
@@ -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);