diff options
Diffstat (limited to 'libs/libcurl/src/smtp.c')
-rw-r--r-- | libs/libcurl/src/smtp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/libcurl/src/smtp.c b/libs/libcurl/src/smtp.c index 685513b3b1..aea41bb4e3 100644 --- a/libs/libcurl/src/smtp.c +++ b/libs/libcurl/src/smtp.c @@ -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, "@"); |