From 6639dfcf3d8bb983d248c697d9c9d6adb4350920 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 30 Jul 2005 00:35:20 +0000 Subject: strcpy -> strlcpy, strcat -> strlcat svn path=/trunk/; revision=4186 --- transact.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'transact.c') diff --git a/transact.c b/transact.c index a757538c..0ca37d7e 100644 --- a/transact.c +++ b/transact.c @@ -963,7 +963,7 @@ int readheaders(int sock, /* We have the real envelope return-path, stored out of band by * SDPS - that's more accurate than any header is going to be. */ - strcpy(msgblk.return_path, sdps_envfrom); + strlcpy(msgblk.return_path, sdps_envfrom, sizeof(msgblk.return_path)); free(sdps_envfrom); } else #endif /* SDPS_ENABLE */ @@ -1206,11 +1206,11 @@ int readheaders(int sock, char errhd[USERNAMELEN + POPBUFSIZE], *errmsg; errmsg = errhd; - (void) strcpy(errhd, "X-Fetchmail-Warning: "); + strlcpy(errhd, "X-Fetchmail-Warning: ", sizeof(errhd)); if (no_local_matches) { if (reject_count != 1) - strcat(errhd, GT_("no recipient addresses matched declared local names")); + strlcat(errhd, GT_("no recipient addresses matched declared local names"), sizeof(errhd)); else { for (idp = msgblk.recipients; idp; idp = idp->next) @@ -1241,7 +1241,7 @@ int readheaders(int sock, errlen += strlen(idp->id) + 2; xalloca(errmsg, char *, errlen+3); - (void) strcpy(errmsg, errhd); + strcpy(errmsg, errhd); for (idp = msgblk.recipients; idp; idp = idp->next) if (idp->val.status.mark == XMIT_RCPTBAD) { -- cgit v1.2.3