diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2020-08-19 07:37:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-19 16:44:30 (GMT) |
commit | 7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04 (patch) | |
tree | 936c40c921e79b8eabd623181d78167188bbc810 /lib/smtp.c | |
parent | 4446fda8e019a0138bec1aa2d83a720d63019ff9 (diff) | |
download | CMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.zip CMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.tar.gz CMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.tar.bz2 |
curl 2020-08-19 (9d954e49)
Code extracted from:
https://github.com/curl/curl.git
at commit 9d954e49bce3706a9a2efb119ecd05767f0f2a9e (curl-7_72_0).
Diffstat (limited to 'lib/smtp.c')
-rw-r--r-- | lib/smtp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1760,8 +1760,10 @@ static CURLcode smtp_parse_address(struct connectdata *conn, const char *fqma, return CURLE_OUT_OF_MEMORY; length = strlen(dup); - if(dup[length - 1] == '>') - dup[length - 1] = '\0'; + if(length) { + if(dup[length - 1] == '>') + dup[length - 1] = '\0'; + } /* Extract the host name from the address (if we can) */ host->name = strpbrk(dup, "@"); |