fixes missing string terminator when printing simplified xml (dav get-property)

Thu, 14 Dec 2017 13:35:03 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 14 Dec 2017 13:35:03 +0100
changeset 346
3e20fd78e555
parent 345
61c4576072b3
child 347
b6ff6be7aa91

fixes missing string terminator when printing simplified xml (dav get-property)

dav/main.c file | annotate | diff | comparison | revisions
--- a/dav/main.c	Wed Dec 13 20:01:14 2017 +0100
+++ b/dav/main.c	Thu Dec 14 13:35:03 2017 +0100
@@ -1818,7 +1818,8 @@
 char* xml2str(DavXmlNode *node) {
     char *str = malloc(256);
     UcxBuffer *buf = ucx_buffer_new(str, 256, UCX_BUFFER_AUTOEXTEND);
-    xml2str_i(node, buf, 0); 
+    xml2str_i(node, buf, 0);
+    ucx_buffer_putc(buf, 0);
     char *space = buf->space;
     ucx_buffer_free(buf);
     return space;

mercurial