File 0014-lib-smtp-smtp-address-Don-t-recognize-an-address-wit.patch of Package dovecot23.15100
From 063462d588eaea6f266596fae5f5470792dcc98d Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Fri, 20 Mar 2020 13:35:19 +0100
Subject: [PATCH 14/16] lib-smtp: smtp-address - Don't recognize an address
with empty localpart as <>.
Depending on context, the addresses <""@domain.tld> and <""> are potentially
valid non-null addresses.
---
src/lib-smtp/smtp-address.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/lib-smtp/smtp-address.h b/src/lib-smtp/smtp-address.h
index 64b6a009f4..326a6738f2 100644
--- a/src/lib-smtp/smtp-address.h
+++ b/src/lib-smtp/smtp-address.h
@@ -200,15 +200,14 @@ smtp_address_equals_icase(const struct smtp_address *address1,
static inline bool ATTR_NULL(1) ATTR_PURE
smtp_address_isnull(const struct smtp_address *address)
{
- return (address == NULL || address->localpart == NULL ||
- *address->localpart == '\0');
+ return (address == NULL || address->localpart == NULL);
}
static inline bool ATTR_NULL(1) ATTR_PURE
smtp_address_is_broken(const struct smtp_address *address)
{
return (address != NULL &&
- (address->localpart == NULL || *address->localpart == '\0') &&
+ smtp_address_isnull(address) &&
(address->raw != NULL && *address->raw != '\0'));
}
--
2.11.0