Skip to content

Commit be5693d

Browse files
authored
Merge pull request #5991 from larsewi/chroot
ENT-13551: Fixed potential buffer overflow when computing chroot path
2 parents 1f54757 + 3f2dd41 commit be5693d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpromises/changes_chroot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void PrepareChangesChroot(const char *path)
215215
continue;
216216
}
217217
char entry_path[PATH_MAX];
218-
strcpy(entry_path, path);
218+
strlcpy(entry_path, path, sizeof(entry_path));
219219
JoinPaths(entry_path, PATH_MAX, entry->d_name);
220220
PrepareChangesChroot(entry_path);
221221
}

0 commit comments

Comments
 (0)