chiark / gitweb /
resolved: fix deserialization of UTF8 host names
authorLennart Poettering <lennart@poettering.net>
Thu, 31 Jul 2014 17:54:24 +0000 (19:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 Jul 2014 17:54:24 +0000 (19:54 +0200)
src/resolve/resolved-dns-packet.c

index 3eda803..7793a01 100644 (file)
@@ -840,7 +840,7 @@ int dns_packet_read_name(DnsPacket *p, char **_ret, size_t *start) {
                         else
                                 first = false;
 
-                        memcpy(ret + n, t, c);
+                        memcpy(ret + n, t, r);
                         n += r;
                         continue;
                 } else if ((c & 0xc0) == 0xc0) {