git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] Fix uninitialized variable in get_refs_via_rsync().

From
Richard Weinberger <richard@nod.at>
Date
Jan 14, 2010, 23:28 UTC
Message-ID
<201001150029.00191.richard@nod.at>
This fixes a crash when cloning via rsync://.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/transport.c b/transport.c
index b5332c0..3b489b3 100644
--- a/transport.c
+++ b/transport.c
@@ -143,7 +143,7 @@ static const char *rsync_url(const char *url)
 static struct ref *get_refs_via_rsync(struct transport *transport, int 
for_push)
 {
 	struct strbuf buf = STRBUF_INIT, temp_dir = STRBUF_INIT;
-	struct ref dummy, *tail = &dummy;
+	struct ref dummy = {0}, *tail = &dummy;
 	struct child_process rsync;
 	const char *args[5];
 	int temp_dir_len;
-- 
1.6.5.7
Message 1 of 1 in “Fix uninitialized variable in get_refs_via_rsync().”
  1. 1/2 Fix uninitialized variable in get_refs_via_rsync().Richard Weinberger, Jan 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.