From: Lennart Poettering Date: Mon, 24 Apr 2006 00:04:17 +0000 (+0000) Subject: Merge patch "avahi-compat-txt-buffer-size.patch" from Stanislav Brabec/JP Rosevear... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=e5d17c4576a328d4086c899f52c71fa8ddbbe4a0;p=catta Merge patch "avahi-compat-txt-buffer-size.patch" from Stanislav Brabec/JP Rosevear, see #30 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1192 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-compat-libdns_sd/txt.c b/avahi-compat-libdns_sd/txt.c index c85837a..2b539e6 100644 --- a/avahi-compat-libdns_sd/txt.c +++ b/avahi-compat-libdns_sd/txt.c @@ -60,7 +60,7 @@ void DNSSD_API TXTRecordCreate( if ((t = avahi_new(TXTRecordInternal, 1))) { t->buffer = buffer; - t->max_size = length; + t->max_size = buffer ? length : (size_t)0; t->size = 0; t->malloc_buffer = NULL; }