]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_init: initialize array
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 7 Feb 2018 12:43:08 +0000 (13:43 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 7 Feb 2018 12:43:08 +0000 (13:43 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxc_init.c

index cb6d964e1e8fc9bfa29798c85714ebea6d442cab..f556f8a990e17e432cb031fd7540b2b7c23c7437 100644 (file)
@@ -79,10 +79,10 @@ static void remove_self(void)
 {
        int ret;
        ssize_t n;
-       char path[MAXPATHLEN] = {0};
+       char path[4096] = {0};
 
        n = readlink("/proc/self/exe", path, sizeof(path));
-       if (n < 0 || n >= MAXPATHLEN) {
+       if (n < 0 || n >= 4096) {
                SYSERROR("Failed to readlink \"/proc/self/exe\"");
                return;
        }