tool/var: explain how the null termination byte is there

Closes #19287
This commit is contained in:
Daniel Stenberg 2025-10-30 18:18:22 +01:00
parent eb22e37060
commit 1afc4bb768
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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) {