From af243857faeb095f0dd6f50e588e9a060eaff057 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 21 May 2021 11:14:49 +0200 Subject: [PATCH] qrap: Silence gcc -O3 warning about strncpy() buffer length Signed-off-by: Stefano Brivio --- qrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrap.c b/qrap.c index c58b514..fc7b397 100644 --- a/qrap.c +++ b/qrap.c @@ -109,7 +109,7 @@ int main(int argc, char **argv) if (argc >= 3) { fd = strtol(argv[1], NULL, 0); if (fd >= 3 && fd < INT_MAX && !errno) { - char env_path[ARG_MAX], *p, command[ARG_MAX]; + char env_path[ARG_MAX + 1], *p, command[ARG_MAX]; strncpy(env_path, getenv("PATH"), ARG_MAX); p = strtok(env_path, ":");