diff --git a/lib/smtp.c b/lib/smtp.c index a87e6126ad..79499e6d40 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1773,8 +1773,6 @@ static CURLcode smtp_parse_address(struct connectdata *conn, const char *fqma, and send the host name using UTF-8 rather than as 7-bit ACE (which is our preference) */ } - else - host->name = NULL; /* Extract the local address from the mailbox */ *address = dup; diff --git a/lib/url.c b/lib/url.c index 85cdd53368..47fc66aedd 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1438,8 +1438,12 @@ void Curl_verboseconnect(struct connectdata *conn) */ bool Curl_is_ASCII_name(const char *hostname) { + /* get an UNSIGNED local version of the pointer */ const unsigned char *ch = (const unsigned char *)hostname; + if(!hostname) /* bad input, consider it ASCII! */ + return TRUE; + while(*ch) { if(*ch++ & 0x80) return FALSE;