From 1afc4bb76890e24266aca5d86c2c083ac3666adf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Oct 2025 18:18:22 +0100 Subject: [PATCH] tool/var: explain how the null termination byte is there Closes #19287 --- src/var.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/var.c b/src/var.c index 87f33af282..94d79695ac 100644 --- 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) { -- 2.47.3