]> git.meshlink.io Git - catta/commitdiff
Merge patch "avahi-compat-txt-buffer-size.patch" from Stanislav Brabec/JP Rosevear...
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 00:04:17 +0000 (00:04 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Apr 2006 00:04:17 +0000 (00:04 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1192 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

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;
     }