acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH acl] Fix usage of uninitialized variable


From: Guillem Jover
Subject: [PATCH acl] Fix usage of uninitialized variable
Date: Sat, 3 Dec 2022 12:12:07 +0100

From: Vasily Gurevich <vas.gurevich@gmail.com>

Ref: https://bugs.debian.org/612599
Signed-off-by: Guillem Jover <guillem@hadrons.org>
---
 tools/getfacl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/getfacl.c b/tools/getfacl.c
index 63f0736..ccac98e 100644
--- a/tools/getfacl.c
+++ b/tools/getfacl.c
@@ -381,6 +381,8 @@ int do_show(FILE *stream, const char *path_p, const struct 
stat *st,
                        show_line(stream, NULL, NULL, NULL, NULL,
                                  &dacl_names, dacl, &dacl_ent, dacl_mask);
                        continue;
+               } else if (!dacl && !acl) {
+                       return -1;
                } else {
                        if (acl_tag == ACL_USER || acl_tag == ACL_GROUP) {
                                int id_cmp = 0;
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]