civodul pushed a commit to branch master
in repository guix.
commit 4a53c19a325e7192c5aa6b0b34daf660ea615e17
Author: Ludovic Courtès <[email protected]>
AuthorDate: Thu May 7 18:38:54 2020 +0200
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.
---
gnu/packages/aux-files/run-in-namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/aux-files/run-in-namespace.c
b/gnu/packages/aux-files/run-in-namespace.c
index 160f7da..37c493e 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);