change_uid_gid() never initialises sz which may cause greedy_realloc to
skip the initial buffer allocation.
---
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 84724d5..0bd52da 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2366,7 +2366,7 @@ static int change_uid_gid(char **_home) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_close_ int fd = -1;
unsigned n_uids = 0;
- size_t sz, l;
+ size_t sz = 0, l;
uid_t uid;
gid_t gid;
pid_t pid;
--
1.9.1
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel