fixed zero-length format string in ls_size_str

Thu, 15 Oct 2015 11:05:27 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 15 Oct 2015 11:05:27 +0200
changeset 165
b66bed169fc3
parent 164
4c204e40ef52
child 166
8911170d5e78

fixed zero-length format string in ls_size_str

dav/main.c file | annotate | diff | comparison | revisions
--- a/dav/main.c	Wed Oct 14 16:07:54 2015 +0200
+++ b/dav/main.c	Thu Oct 15 11:05:27 2015 +0200
@@ -442,7 +442,7 @@
     uint64_t size = res->contentlength;
     
     if(res->iscollection) {
-        snprintf(str, 16, "");
+        str[0] = '\0'; // currently no information for collections
     } else if(size < 0x400) {
         snprintf(str, 16, "%" PRIu64 " bytes", size);
     } else if(size < 0x100000) {

mercurial