From 0b4a304dd7c142ddc8147565b916fc46a3af11a9 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Fri, 20 Mar 2020 13:37:04 +0100 Subject: [PATCH] lib-smtp: smtp-address - Only produce a <> address in smtp_address_clone() when that is the input. It also produced an effective null address when the localpart was empty. --- src/lib-smtp/smtp-address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-smtp/smtp-address.c b/src/lib-smtp/smtp-address.c index dd045fb662..1997535d51 100644 --- a/src/lib-smtp/smtp-address.c +++ b/src/lib-smtp/smtp-address.c @@ -795,7 +795,7 @@ smtp_address_clone(pool_t pool, const struct smtp_address *src) /* @UNSAFE */ size = sizeof(struct smtp_address); - if (src->localpart != NULL && *src->localpart != '\0') { + if (!smtp_address_isnull(src)) { lpsize = strlen(src->localpart) + 1; size = MALLOC_ADD(size, lpsize); } -- 2.47.3