diff --git a/cr-restore.c b/cr-restore.c index 095d73992..3be05dde2 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -968,9 +968,8 @@ static void restore_pgid(void) static int mount_proc(void) { 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) { pr_perror("mkdtemp failed %s", proc_mountpoint); return -1;