/* addr-spec = local-part "@" domain */
int ret, ret2;
- str_truncate(ctx->parser.last_comment, 0);
+ if (ctx->parser.last_comment != NULL)
+ str_truncate(ctx->parser.last_comment, 0);
ret = parse_local_part(ctx);
if (ret != 0 && *ctx->parser.data == '@') {
ret = ret2;
}
- if (str_len(ctx->parser.last_comment) > 0) {
- ctx->addr.name =
- p_strdup(ctx->pool, str_c(ctx->parser.last_comment));
+ if (ctx->parser.last_comment != NULL) {
+ if (str_len(ctx->parser.last_comment) > 0) {
+ ctx->addr.name =
+ p_strdup(ctx->pool, str_c(ctx->parser.last_comment));
+ }
}
return ret;
}