X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Frr.c;h=8b7fab7d861493814faac1e5ed6e0f2d6d5e4967;hb=383d0aab1104dbb6b1a86f18f78035aef9810f0c;hp=57ddca4e792073f597af64efddd10d98a3299b87;hpb=f6712902a92eb82b6c8d7e7fd0980a20a716fa0d;p=catta diff --git a/avahi-core/rr.c b/avahi-core/rr.c index 57ddca4..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); @@ -691,7 +691,7 @@ int avahi_record_is_valid(AvahiRecord *r) { AvahiStringList *strlst; for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) - if (strlst->size > 255) + if (strlst->size > 255 || strlst->size <= 0) return 0; return 1;