Commit ffe259d9e52a472b172d9834ed44a98fd1ce4d1a

Edward Thomson 2017-01-11T11:52:06

Merge pull request #4074 from fcharlie/master fix examples/network/clone.c: heap-buffer-overflow

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/examples/network/clone.c b/examples/network/clone.c
index caf41cc..540000b 100644
--- a/examples/network/clone.c
+++ b/examples/network/clone.c
@@ -50,7 +50,7 @@ static int sideband_progress(const char *str, int len, void *payload)
 {
 	(void)payload; // unused
 
-	printf("remote: %*s", len, str);
+	printf("remote: %.*s", len, str);
 	fflush(stdout);
 	return 0;
 }