]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/winansi.c
convert trivial sprintf / strcpy calls to xsnprintf
[thirdparty/git.git] / compat / winansi.c
index efc5bb3a4b63166eccb33f6ec6a8ad57e4c9ac36..ceff55bd67696403f374f68ae6d3db97f603aebe 100644 (file)
@@ -539,7 +539,7 @@ void winansi_init(void)
                return;
 
        /* create a named pipe to communicate with the console thread */
-       sprintf(name, "\\\\.\\pipe\\winansi%lu", GetCurrentProcessId());
+       xsnprintf(name, sizeof(name), "\\\\.\\pipe\\winansi%lu", GetCurrentProcessId());
        hwrite = CreateNamedPipe(name, PIPE_ACCESS_OUTBOUND,
                PIPE_TYPE_BYTE | PIPE_WAIT, 1, BUFFER_SIZE, 0, 0, NULL);
        if (hwrite == INVALID_HANDLE_VALUE)