Also the end-group's message_address shouldn't have invalid_syntax=TRUE,
except when we didn't actually find the ending ';'
/* mailbox-list =
(mailbox *("," mailbox)) / obs-mbox-list */
if (parse_mailbox(ctx) <= 0) {
- ret = -1;
- break;
+ /* broken mailbox - try to continue anyway. */
}
- if (*ctx->parser.data != ',')
+ if (ctx->parser.data == ctx->parser.end ||
+ *ctx->parser.data != ',')
break;
ctx->parser.data++;
if (rfc822_skip_lwsp(&ctx->parser) <= 0) {
}
}
if (ret >= 0) {
- if (*ctx->parser.data != ';')
+ if (ctx->parser.data == ctx->parser.end ||
+ *ctx->parser.data != ';')
ret = -1;
else {
ctx->parser.data++;