fix some snprintf warnings webdav

Tue, 19 Apr 2022 19:15:23 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 19 Apr 2022 19:15:23 +0200
branch
webdav
changeset 302
dfbd3a535eac
parent 301
2bc514931612
child 303
ad9ba51c8634

fix some snprintf warnings

src/server/webdav/webdav.c file | annotate | diff | comparison | revisions
--- a/src/server/webdav/webdav.c	Tue Apr 19 19:14:49 2022 +0200
+++ b/src/server/webdav/webdav.c	Tue Apr 19 19:15:23 2022 +0200
@@ -1089,7 +1089,7 @@
             return 1;
         }
         uint64_t contentlength = s->st_size;
-        snprintf(buf, 64, "%" PRIu64 "\0", contentlength);
+        snprintf(buf, 64, "%" PRIu64, contentlength);
         if(w_addprop(res, pool, "getcontentlength", buf)) {
             return 1;
         }
@@ -1123,7 +1123,7 @@
         }
         snprintf(buf,
             96,
-            "\"%x-%x\"\0",
+            "\"%x-%x\"",
             (int)s->st_size,
             (int)s->st_mtim.tv_sec);
         if(w_addprop(res, pool, "getetag", buf)) {

mercurial