lxc_init: initialize array

parent 14f39e10
...@@ -79,10 +79,10 @@ static void remove_self(void) ...@@ -79,10 +79,10 @@ static void remove_self(void)
{ {
int ret; int ret;
ssize_t n; ssize_t n;
char path[MAXPATHLEN] = {0}; char path[4096] = {0};
n = readlink("/proc/self/exe", path, sizeof(path)); 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\""); SYSERROR("Failed to readlink \"/proc/self/exe\"");
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment