mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
Yet another pointy hat: When restoring file flags, it's okay to use the
shared stat buffer, but don't try to access it through an uninitialized pointer.
This commit is contained in:
parent
0ddb95d12c
commit
98183bf412
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131585
@ -946,7 +946,7 @@ set_fflags(struct archive *a, const char *name, mode_t mode,
|
||||
if (stat(name, &extract->st) == 0) {
|
||||
extract->st.st_flags &= ~clear;
|
||||
extract->st.st_flags |= set;
|
||||
if (chflags(name, extract->pst->st_flags) != 0) {
|
||||
if (chflags(name, extract->st.st_flags) != 0) {
|
||||
archive_set_error(a, errno,
|
||||
"Failed to set file flags");
|
||||
ret = ARCHIVE_WARN;
|
||||
|
Loading…
Reference in New Issue
Block a user