Commit dbbd8d40 authored by Pavel Emelyanov's avatar Pavel Emelyanov

rst: Don't allocate PATH_MAX on stack for proc mountpoint

Use direct name assignment, it's enough.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent da8dbe43
...@@ -968,9 +968,8 @@ static void restore_pgid(void) ...@@ -968,9 +968,8 @@ static void restore_pgid(void)
static int mount_proc(void) static int mount_proc(void)
{ {
int ret; int ret;
char proc_mountpoint[PATH_MAX]; char proc_mountpoint[] = "crtools-proc.XXXXXX";
snprintf(proc_mountpoint, sizeof(proc_mountpoint), "crtools-proc.XXXXXX");
if (mkdtemp(proc_mountpoint) == NULL) { if (mkdtemp(proc_mountpoint) == NULL) {
pr_perror("mkdtemp failed %s", proc_mountpoint); pr_perror("mkdtemp failed %s", proc_mountpoint);
return -1; return -1;
......
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