Skip to content
Snippets Groups Projects
Commit d64c6fcf authored by Moe Jette's avatar Moe Jette
Browse files

fix possible overflow

parent a2be837e
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ int slurm_set_cpuset(char *path, pid_t pid, size_t size, ...@@ -59,7 +59,7 @@ int slurm_set_cpuset(char *path, pid_t pid, size_t size,
{ {
int fd, rc; int fd, rc;
char file_path[PATH_MAX]; char file_path[PATH_MAX];
char mstr[1 + CPU_SETSIZE / 4]; char mstr[1 + CPU_SETSIZE * 4];
if (mkdir(path, 0700) && (errno != EEXIST)) { if (mkdir(path, 0700) && (errno != EEXIST)) {
error("mkdir(%s): %m", path); error("mkdir(%s): %m", path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment