From: Lennart Poettering Date: Thu, 4 May 2006 21:50:44 +0000 (+0000) Subject: actually enforce that we never print more than 20 bytes from arbitrary records in... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=affc2091e149b08220254a7f700a8be935d0cdde;p=catta actually enforce that we never print more than 20 bytes from arbitrary records in avahi_record_to_string() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1209 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/rr.c b/avahi-core/rr.c index 46aa7a2..8b7fab7 100644 --- a/avahi-core/rr.c +++ b/avahi-core/rr.c @@ -303,7 +303,7 @@ char *avahi_record_to_string(const AvahiRecord *r) { for (c = r->data.generic.data, n = r->data.generic.size, i = 0; n > 0 && i < 20; - c ++, n --) { + c ++, n --, i++) { sprintf(e, " %02X", *c); e = strchr(e, 0);