xfs
[Top] [All Lists]

[patch 2/4] acl: fix setfacl segfault when using only "--" as parameter.

To: xfs@xxxxxxxxxxx
Subject: [patch 2/4] acl: fix setfacl segfault when using only "--" as parameter.
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 30 Dec 2008 12:14:15 -0600
References: <20081230181413.518122170@xxxxxxxxxxx>
User-agent: quilt/0.46-1
Resolves Red Hat bug:
 430458 - execute command "setfacl -- --test" will occur Segmentation Fault

From: Jiri Moskovcak <jmoskovc@xxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

Index: xfs-cmds/acl/setfacl/setfacl.c
===================================================================
--- xfs-cmds.orig/acl/setfacl/setfacl.c
+++ xfs-cmds/acl/setfacl/setfacl.c
@@ -599,6 +599,8 @@ int main(int argc, char *argv[])
                }
        }
        while (optind < argc) {
+               if(!seq)
+                       goto synopsis;
                if (seq_empty(seq))
                        goto synopsis;
                saw_files = 1;

-- 

<Prev in Thread] Current Thread [Next in Thread>