diff options
author | Philip Lorenz <philip@bithub.de> | 2014-04-09 19:08:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-04-10 09:50:39 -0400 |
commit | 70f539ca147694c2a61131b7068526d88decd931 (patch) | |
tree | e8bffb6d641ab5ac63475b4623769c7177ad83c0 | |
parent | 13be49798cc4d1bdf84780b6a315e920f20fa11a (diff) |
nspawn: Fix erroneous OOM when building group list
change_uid_gid() never initialises sz which may cause greedy_realloc to
skip the initial buffer allocation.
-rw-r--r-- | src/nspawn/nspawn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 84724d59c9..0bd52da568 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; |