summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-12-03 22:40:31 +0000
committerJim Meyering <jim@meyering.net>2000-12-03 22:40:31 +0000
commitcb366955f339ef1cdc965016dc7ba71e6bebdef8 (patch)
tree00b34067ed07f08b288ae9f18fed41c017b277f7 /src
parent82a6fbda1cf17c680559f94da7d32397836abfa8 (diff)
downloadcoreutils-cb366955f339ef1cdc965016dc7ba71e6bebdef8.tar.xz
(gobble_file) [USE_ACL]: Set have_acl member unconditionally
to avoid uninitialized memory reference via FILE_HAS_ACL.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ls.c b/src/ls.c
index ef504202b..7782b1dc1 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1899,8 +1899,9 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
}
#if USE_ACL
- if (! S_ISLNK (files[files_index].stat.st_mode))
- files[files_index].have_acl = (4 < acl (path, GETACLCNT, 0, NULL));
+ files[files_index].have_acl =
+ (! S_ISLNK (files[files_index].stat.st_mode)
+ && 4 < acl (path, GETACLCNT, 0, NULL));
#endif
if (S_ISLNK (files[files_index].stat.st_mode)