]> git.ipfire.org Git - telemetry.git/commitdiff
args: Make space in the array for the NULL termination
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Sep 2025 09:21:40 +0000 (09:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 28 Sep 2025 09:21:40 +0000 (09:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/args.c

index b396f4b74aa97ea98ad31d501f7756441aa461e3..7abe62c3efe33588ef8d3a819e8643a1395360a9 100644 (file)
@@ -102,7 +102,7 @@ int collecty_args_push(collecty_args* self, const char* format, ...) {
                goto ERROR;
 
        // Grow argv
-       argv = reallocarray(self->argv, self->argc + 1, sizeof(*self->argv));
+       argv = reallocarray(self->argv, self->argc + 2, sizeof(*self->argv));
        if (!argv)
                goto ERROR;