[systemd-commits] src/nspawn

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Thu Apr 10 06:53:58 PDT 2014


 src/nspawn/nspawn.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70f539ca147694c2a61131b7068526d88decd931
Author: Philip Lorenz <philip at bithub.de>
Date:   Wed Apr 9 19:08:45 2014 +0200

    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.

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;



More information about the systemd-commits mailing list