threads / patch / 22226

patch, 2 partsFix uninitialized variable in get_refs_via_rsync().

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

## tl;dr

One message between Jan 14, 2010 and Jan 14, 2010. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Richard Weinberger· Jan 14, 2010, 23:28 UTC · lore
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(-)
Show changes to transport.c +1 −1
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

← back to recent threads