static pcre *type_re;
static const char *enc_pat = "7bit|8bit|base64|quoted-printable";
static pcre *enc_re;
-static const char *bound_pat = "boundary\\s*=\\s*\"?([\\da-z'()+,-./:=?_ \r\n]+)\"?";
+static const char *bound_pat = "boundary\\s*=\\s*\"?([\\da-z'()+,-./:=?_ \r\n!@\\[\\]]+)\"?";
static pcre *bound_re;
static msgproc_module *text_module = &msgproc_text,
type = msgproc_create(enc, ms->type);
if (ms->type->mpm_type == MSGPROC_MULTIPART) {
- assert(ms->boundary);
- msgproc_start(type);
- msgproc_set(type, 1, ms->boundary, strlen(ms->boundary));
- free(ms->boundary);
+ if (ms->boundary) {
+ msgproc_start(type);
+ msgproc_set(type, 1, ms->boundary,
+ strlen(ms->boundary));
+ free(ms->boundary);
+ } else {
+ msgproc_finish(type);
+ if (enc != m) msgproc_finish(enc);
+ }
} else {
msgproc_start(type);
}