From 3267c1f3d517be0410c1315031344749e5f051c7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 24 Jun 2001 22:32:14 +0000 Subject: HMH's second cleanup patch. svn path=/trunk/; revision=3377 --- smtp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'smtp.c') 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); -- cgit v1.2.3