aboutsummaryrefslogtreecommitdiffstats
path: root/smtp.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-06-24 22:32:14 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-06-24 22:32:14 +0000
commit3267c1f3d517be0410c1315031344749e5f051c7 (patch)
tree0c39214e43c6a19043cf8ba74fa2a12541c47c07 /smtp.c
parent5d22bd95ff9fb9fa813268dadc02cb25428cbeb0 (diff)
downloadfetchmail-3267c1f3d517be0410c1315031344749e5f051c7.tar.gz
fetchmail-3267c1f3d517be0410c1315031344749e5f051c7.tar.bz2
fetchmail-3267c1f3d517be0410c1315031344749e5f051c7.zip
HMH's second cleanup patch.
svn path=/trunk/; revision=3377
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/smtp.c b/smtp.c
index 530d17e4..23ada08f 100644
--- a/smtp.c
+++ b/smtp.c
@@ -111,7 +111,11 @@ int SMTP_from(int sock, const char *from, const char *opts)
#endif /* HAVE_SNPRINTF */
"MAIL FROM:<%s>", from);
if (opts)
- strncat(buf, opts, sizeof(buf));
+#ifdef HAVE_SNPRINTF
+ snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%s", opts);
+#else
+ strcat(buf, opts);
+#endif /* HAVE_SNPRINTF */
SockPrintf(sock,"%s\r\n", buf);
if (outlevel >= O_MONITOR)
report(stdout, "%cMTP> %s\n", smtp_mode, buf);