]> git.lizzy.rs Git - plan9front.git/commitdiff
ip/socksd: fix %.*s format in dialstring
authorcinap_lenrek <cinap_lenrek@felloff.net>
Mon, 25 Feb 2019 02:50:14 +0000 (03:50 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Mon, 25 Feb 2019 02:50:14 +0000 (03:50 +0100)
sys/src/cmd/ip/socksd.c

index aad6b5b62d3342e5d646b1b6e59909e4af32bfdf..8e3ff19c69bbf1c1f660a6097826afdce6d9ebaf 100644 (file)
@@ -78,6 +78,7 @@ addr2str(char *proto, uchar *a){
                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;
                }