From: Daniel Stenberg Date: Thu, 30 Oct 2025 17:18:22 +0000 (+0100) Subject: tool/var: explain how the null termination byte is there X-Git-Tag: curl-8_17_0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1afc4bb76890e24266aca5d86c2c083ac3666adf;p=thirdparty%2Fcurl.git tool/var: explain how the null termination byte is there Closes #19287 --- 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) {