File 0013-lib-smtp-smtp-address-Don-t-return-NULL-from-smtp_ad.patch of Package dovecot23.15100

From b34002a4ca301ed94cd944ee3504287ed7e58031 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Sun, 22 Mar 2020 18:14:44 +0100
Subject: [PATCH 13/16] lib-smtp: smtp-address - Don't return NULL from
 smtp_address_clone*() unless the input is NULL.

---
 src/lib-smtp/smtp-address.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib-smtp/smtp-address.c b/src/lib-smtp/smtp-address.c
index 9487e2bc6c..dd045fb662 100644
--- a/src/lib-smtp/smtp-address.c
+++ b/src/lib-smtp/smtp-address.c
@@ -789,7 +789,7 @@ smtp_address_clone(pool_t pool, const struct smtp_address *src)
 	size_t size, lpsize = 0, dsize = 0, rsize = 0;
 	char *data, *localpart = NULL, *domain = NULL, *raw = NULL;
 
-	if (src == NULL || (smtp_address_isnull(src) && src->raw == NULL))
+	if (src == NULL)
 		return NULL;
 
 	/* @UNSAFE */
@@ -857,7 +857,7 @@ struct smtp_address *smtp_address_clone_temp(const struct smtp_address *src)
 {
 	struct smtp_address *new;
 
-	if (src == NULL || (smtp_address_isnull(src) && src->raw == NULL))
+	if (src == NULL)
 		return NULL;
 
 	new = t_new(struct smtp_address, 1);
-- 
2.11.0

openSUSE Build Service is sponsored by