diff options
author | Stanislav Malyshev <stas@php.net> | 2007-07-31 00:37:01 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-07-31 00:37:01 +0000 |
commit | 7353529de902dc55e7d57c20ee0d57a9ed546c3d (patch) | |
tree | 4b2991b4921f409abc0d2d0c6d60cca63c99d919 | |
parent | 44af72814f5a1072742106c5d49f705b0a585253 (diff) | |
download | php-git-7353529de902dc55e7d57c20ee0d57a9ed546c3d.tar.gz |
sometimes c-client returns non-null entry with null host
-rw-r--r-- | ext/imap/php_imap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 49e5424b1e..bc839b4406 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3258,7 +3258,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 { offset += sprintf(bufferTo + offset, "%s@%s,", addr->mailbox, addr->host); @@ -3281,7 +3281,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 { offset += sprintf(bufferCc + offset, "%s@%s,", addr->mailbox, addr->host); @@ -3301,7 +3301,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 { offset += sprintf(bufferBcc + offset, "%s@%s,", addr->mailbox, addr->host); |