]> git.meshlink.io Git - catta/blobdiff - avahi-compat-libdns_sd/txt.c
work around yet another bsd limitation: prefer IP_MULTICAST_IF over IP_SENDSRCADDR...
[catta] / avahi-compat-libdns_sd / txt.c
index c85837a5518e54162df3bf7a09603b8da7234b14..2b539e68c99ba242a21b117d0ca40a11bdd70019 100644 (file)
@@ -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;
     }