diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-05-12 10:08:35 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-05-12 10:12:23 +0200 |
commit | ab245dddc6a34d6dd2965bf1f74071590c553112 (patch) | |
tree | 66883e8ea7a33eaab93f5e84acb2404b41947782 /smtp.c | |
parent | 1e3a3e7e47336ceaee07cc495c728e35f4ac9fc6 (diff) | |
download | fetchmail-ab245dddc6a34d6dd2965bf1f74071590c553112.tar.gz fetchmail-ab245dddc6a34d6dd2965bf1f74071590c553112.tar.bz2 fetchmail-ab245dddc6a34d6dd2965bf1f74071590c553112.zip |
Replace most strncpy() by strlcpy() calls.
Diffstat (limited to 'smtp.c')
-rw-r--r-- | smtp.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -204,8 +204,7 @@ int SMTP_ehlo(int sock, char smtp_mode, const char *host, char *name, char *pass if (!strncasecmp(hp->name, smtp_response+4, strlen(hp->name))) { *opt |= hp->value; if (strncmp(hp->name, "AUTH ", 5) == 0) - strncpy(auth_response, smtp_response, sizeof(auth_response)); - auth_response[sizeof(auth_response)-1] = '\0'; + strlcpy(auth_response, smtp_response, sizeof(auth_response)); } if ((smtp_response[0] == '1' || smtp_response[0] == '2' || smtp_response[0] == '3') && smtp_response[3] == ' ') { if (*opt & ESMTP_AUTH) |