aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
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 */