summaryrefslogtreecommitdiff
path: root/net-misc/openssh-x/files/openssh-6.0_p1-hpn-progressmeter.patch
blob: 56805d12a9b74c6d7a3f36403c571ac38e7636f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
don't go reading random stack values

already e-mailed to upstream hpn devs

--- progressmeter.c
+++ progressmeter.c
@@ -183,7 +183,7 @@
 		percent = ((float)cur_pos / end_pos) * 100;
 	else
 		percent = 100;
-	snprintf(buf + strlen(buf), win_size - strlen(buf-8),
+	snprintf(buf + strlen(buf), win_size - strlen(buf) - 8,
 	    " %3d%% ", percent);
 
 	/* amount transferred */