aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/transact.c b/transact.c
index db8a4cd9..46a767eb 100644
--- a/transact.c
+++ b/transact.c
@@ -821,8 +821,7 @@ eoh:
already_has_return_path = TRUE;
if (cp[0]=='\0') /* nxtaddr() strips the brackets... */
cp=nulladdr;
- strncpy(msgblk.return_path, cp, sizeof(msgblk.return_path));
- msgblk.return_path[sizeof(msgblk.return_path)-1] = '\0';
+ strlcpy(msgblk.return_path, cp, sizeof(msgblk.return_path));
if (!ctl->mda) {
free(line);
continue;
@@ -1079,8 +1078,7 @@ process_headers:
else if (app_from_offs >= 0 && (ap = nxtaddr(msgblk.headers + app_from_offs))) {}
/* multi-line MAIL FROM addresses confuse SMTP terribly */
if (ap && !strchr(ap, '\n')) {
- strncpy(msgblk.return_path, ap, sizeof(msgblk.return_path));
- msgblk.return_path[sizeof(msgblk.return_path)-1] = '\0';
+ strlcpy(msgblk.return_path, ap, sizeof(msgblk.return_path));
}
}