aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-06-23 14:50:12 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-06-23 14:50:12 +0000
commit75b1a90747d6fa2d0d2962856c2875b92ebcfe7b (patch)
tree7431f59f25204ad0d0d672dcd68466d2ef30631c /socket.c
parentc55e6971c9006e85f25e9ef758b8980d8920e149 (diff)
downloadfetchmail-75b1a90747d6fa2d0d2962856c2875b92ebcfe7b.tar.gz
fetchmail-75b1a90747d6fa2d0d2962856c2875b92ebcfe7b.tar.bz2
fetchmail-75b1a90747d6fa2d0d2962856c2875b92ebcfe7b.zip
strncat/snprintf cleanup.
svn path=/trunk/; revision=3366
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 0b2d59f3..12dca7ab 100644
--- a/socket.c
+++ b/socket.c
@@ -325,7 +325,12 @@ int SockOpen(const char *host, int clientPort, const char *options,
#ifdef HAVE_SOCKETPAIR
if (plugin) {
char buf[10];
- sprintf(buf,"%d",clientPort);
+#ifdef HAVE_SNPRINTF
+ snprintf(buf, sizeof(buf), /* Yeah, paranoic. So what? :P */
+#else
+ sprintf(buf,
+#endif /* HAVE_SNPRINTF */
+ "%d",clientPort);
return handle_plugin(host,buf,plugin);
}
#endif /* HAVE_SOCKETPAIR */