aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-05-21 11:14:49 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-05-21 11:14:49 +0200
commitaf243857faeb095f0dd6f50e588e9a060eaff057 (patch)
tree5ae923c562100629c67e1e2b1dd71c7b63981c1d
parent4adae47c40e2f1bb66e8699747daa2eabee425f7 (diff)
downloadpasst-af243857faeb095f0dd6f50e588e9a060eaff057.tar
passt-af243857faeb095f0dd6f50e588e9a060eaff057.tar.gz
passt-af243857faeb095f0dd6f50e588e9a060eaff057.tar.bz2
passt-af243857faeb095f0dd6f50e588e9a060eaff057.tar.lz
passt-af243857faeb095f0dd6f50e588e9a060eaff057.tar.xz
passt-af243857faeb095f0dd6f50e588e9a060eaff057.tar.zst
passt-af243857faeb095f0dd6f50e588e9a060eaff057.zip
qrap: Silence gcc -O3 warning about strncpy() buffer length
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--qrap.c2
1 files changed, 1 insertions, 1 deletions
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, ":");