From fb927452c9b190766f256626ac4f73e458d4db00 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 31 Jul 2007 00:31:10 +0000 Subject: [PATCH] sometimes c-client lib returns non-null entry with null host --- ext/imap/php_imap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 3197ada50a..0a80eaf3a7 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3407,7 +3407,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = NULL; rfc822_parse_adrlist(&addr, tempMailTo, NULL); while (addr) { - if (strcmp(addr->host, ERRHOST) == 0) { + if (addr->host == NULL || strcmp(addr->host, ERRHOST) == 0) { PHP_IMAP_BAD_DEST; } else { bufferTo = safe_erealloc(bufferTo, bt_len, 1, strlen(addr->mailbox)); @@ -3436,7 +3436,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = NULL; rfc822_parse_adrlist(&addr, tempMailTo, NULL); while (addr) { - if (strcmp(addr->host, ERRHOST) == 0) { + if (addr->host == NULL || strcmp(addr->host, ERRHOST) == 0) { PHP_IMAP_BAD_DEST; } else { bufferCc = safe_erealloc(bufferCc, bt_len, 1, strlen(addr->mailbox)); @@ -3462,7 +3462,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = NULL; rfc822_parse_adrlist(&addr, tempMailTo, NULL); while (addr) { - if (strcmp(addr->host, ERRHOST) == 0) { + if (addr->host == NULL || strcmp(addr->host, ERRHOST) == 0) { PHP_IMAP_BAD_DEST; } else { bufferBcc = safe_erealloc(bufferBcc, bt_len, 1, strlen(addr->mailbox)); -- 2.50.1