openbsd-ports/mail/dovecot/patches/patch-src_lib-mail_message-address_c
jolan 34678ea2bf fix three crashing bugs, bump PKGNAME
- searching address fields can crash sometimes
- auth process crashes if user doesn't have home directory set
- sme BODY and BODYSTRUCTURE replies missed data for message/rfc822 MIME
  parts causing clients to break
2003-09-23 06:34:32 +00:00

36 lines
1.1 KiB
Plaintext

$OpenBSD: patch-src_lib-mail_message-address_c,v 1.1 2003/09/23 06:34:32 jolan Exp $
--- src/lib-mail/message-address.c.orig 2003-03-20 09:46:34.000000000 -0600
+++ src/lib-mail/message-address.c 2003-09-23 00:45:01.000000000 -0500
@@ -252,14 +252,14 @@ void message_address_write(string_t *str
} else if ((addr->name == NULL || *addr->name == '\0') &&
addr->route == NULL) {
i_assert(addr->mailbox != NULL);
- i_assert(addr->domain != NULL);
str_append(str, addr->mailbox);
- str_append_c(str, '@');
- str_append(str, addr->domain);
+ if (addr->domain != NULL) {
+ str_append_c(str, '@');
+ str_append(str, addr->domain);
+ }
} else {
i_assert(addr->mailbox != NULL);
- i_assert(addr->domain != NULL);
if (addr->name != NULL) {
str_append(str, addr->name);
@@ -272,8 +272,10 @@ void message_address_write(string_t *str
str_append_c(str, ':');
}
str_append(str, addr->mailbox);
- str_append_c(str, '@');
- str_append(str, addr->domain);
+ if (addr->domain != NULL) {
+ str_append_c(str, '@');
+ str_append(str, addr->domain);
+ }
str_append_c(str, '>');
}