summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-07 18:38:54 +0200
committerLudovic Courtès <ludo@gnu.org>2020-05-07 23:52:25 +0200
commit4a53c19a325e7192c5aa6b0b34daf660ea615e17 (patch)
tree61c457fcbd47a4dd888685eeb556f941caecc405
parent8ba2aa22f1b972b0bb0844c6ad1557b44eab2f7e (diff)
downloadguix-4a53c19a325e7192c5aa6b0b34daf660ea615e17.tar.gz
pack: Fix off-by-one in PRoot handling in the wrapper.
* gnu/packages/aux-files/run-in-namespace.c (exec_with_proot): Make
'proot_argv' one element larger to account for the terminating NULL.
-rw-r--r--gnu/packages/aux-files/run-in-namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/packages/aux-files/run-in-namespace.c b/gnu/packages/aux-files/run-in-namespace.c
index 160f7da1c8..37c493eeeb 100644
--- a/gnu/packages/aux-files/run-in-namespace.c
+++ b/gnu/packages/aux-files/run-in-namespace.c
@@ -221,7 +221,7 @@ exec_with_proot (const char *store, int argc, char *argv[])
 {
   int proot_specific_argc = 4;
   int proot_argc = argc + proot_specific_argc;
-  char *proot_argv[proot_argc], *proot;
+  char *proot_argv[proot_argc + 1], *proot;
   char bind_spec[strlen (store) + 1 + sizeof "@STORE_DIRECTORY@"];
 
   strcpy (bind_spec, store);