diff options
author | Stanislav Malyshev <stas@php.net> | 2007-07-31 00:31:10 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-07-31 00:31:10 +0000 |
commit | fb927452c9b190766f256626ac4f73e458d4db00 (patch) | |
tree | 24a6e2be62ef96f885fe4ca395972b71b1578a70 /ext/imap/php_imap.c | |
parent | 6ed7c8f3aa11fde67e8628afdf18bf7133822db5 (diff) | |
download | php-git-fb927452c9b190766f256626ac4f73e458d4db00.tar.gz |
sometimes c-client lib returns non-null entry with null host
Diffstat (limited to 'ext/imap/php_imap.c')
-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 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)); |