diff --git a/contrib/tcp_wrappers/tcpd.c b/contrib/tcp_wrappers/tcpd.c index 55c6853c1881..dfb238b4f784 100644 --- a/contrib/tcp_wrappers/tcpd.c +++ b/contrib/tcp_wrappers/tcpd.c @@ -62,10 +62,10 @@ char **argv; */ if (argv[0][0] == '/') { - strcpy(path, argv[0]); + strlcpy(path, argv[0], sizeof(path)); argv[0] = strrchr(argv[0], '/') + 1; } else { - sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]); + snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]); } /*