Skip to content

Commit 2c6015d

Browse files
committed
Fixed potential buffer overflow when computing chroot path
Ticket: ENT-13551 Changelog: Title Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 3c1612d commit 2c6015d

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)