]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool/var: explain how the null termination byte is there
authorDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2025 17:18:22 +0000 (18:18 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2025 19:22:37 +0000 (20:22 +0100)
Closes #19287

src/var.c

index 87f33af28226f587e7b47e7a6c5c7aa6ef9190f4..94d79695acc98bea9c8f538a3877a09280bb2616 100644 (file)
--- a/src/var.c
+++ b/src/var.c
@@ -362,6 +362,7 @@ static ParameterError addvariable(const char *name,
   p = calloc(1, sizeof(struct tool_var) + nlen);
   if(p) {
     memcpy(p->name, name, nlen);
+    /* the null termination byte is already present from above */
 
     p->content = contalloc ? content : memdup0(content, clen);
     if(p->content) {