From d8aada1d2460eceec64aee285dbb332a0c83ac29 Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 22 Sep 2025 16:57:15 +0200 Subject: [PATCH] strncpy, copy 127 instead of 128 to avoid warning --- templates/lv2/src/lv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lv2/src/lv2.c b/templates/lv2/src/lv2.c index d6f29db..a1f3ff1 100644 --- a/templates/lv2/src/lv2.c +++ b/templates/lv2/src/lv2.c @@ -110,7 +110,7 @@ static float adjust_param(size_t index, float value) { static void save_hostname(char dest[128]) { dest[0] = 0; #if defined(__linux__) - strncpy(dest, program_invocation_name, 128); + strncpy(dest, program_invocation_name, 127); #elif defined(__APPLE__) pid_t pid = getpid(); if (proc_name(pid, dest, 128) <= 0) {