shithub: riscv

Download patch

ref: b01b637889b587521b2f616ea469b3b64e0a7a9b
parent: 80a1d1ab934b9dcb89833410a48f9da7260c32fe
author: cinap_lenrek <[email protected]>
date: Sun Feb 24 22:50:14 EST 2019

ip/socksd: fix %.*s format in dialstring

--- a/sys/src/cmd/ip/socksd.c
+++ b/sys/src/cmd/ip/socksd.c
@@ -78,6 +78,7 @@
 		case 0x03:
 			n = *a++;
 			port = nhgets(a+n);
+			n = utfnlen((char*)a, n);
 			snprint(s, sizeof(s), "%s!%.*s!%d", proto, n, (char*)a, port);
 			return s;
 		}