removed all references to sprintf from several files (not all files yet)
[citadel.git] / citadel / ipc_c_tcp.c
index f646a66f48b8dfaf6dc27c92ef5a19ed54c76996..45775a8cada7e3faa3f8638b845fe44d47d00560 100644 (file)
@@ -294,7 +294,7 @@ void attach_to_server(int argc, char **argv, char *hostbuf, char *portbuf)
 
        /* If we're using a unix domain socket we can do a bunch of stuff */
        if (!strcmp(cithost, UDS)) {
-               sprintf(sockpath, "citadel.socket");
+               snprintf(sockpath, sizeof sockpath, "citadel.socket");
                serv_sock = uds_connectsock(sockpath);
                if (hostbuf != NULL) strcpy(hostbuf, cithost);
                if (portbuf != NULL) strcpy(portbuf, sockpath);