]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http-push.c
convert trivial sprintf / strcpy calls to xsnprintf
[thirdparty/git.git] / http-push.c
index c98dad23dfd86875209295fadda39c1f1b4f5224..154e67bb05f0ccec2fdd42769b352f78d9f937c8 100644 (file)
@@ -881,7 +881,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
        strbuf_addf(&out_buffer.buf, LOCK_REQUEST, escaped);
        free(escaped);
 
-       sprintf(timeout_header, "Timeout: Second-%ld", timeout);
+       xsnprintf(timeout_header, sizeof(timeout_header), "Timeout: Second-%ld", timeout);
        dav_headers = curl_slist_append(dav_headers, timeout_header);
        dav_headers = curl_slist_append(dav_headers, "Content-Type: text/xml");