]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
gssd: Fix segfault when using -R option
authorSimo Sorce <simo@redhat.com>
Tue, 2 Apr 2013 19:06:13 +0000 (15:06 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 2 Apr 2013 19:08:17 +0000 (15:08 -0400)
The getopt string did not add : after the R option resulting in a
sefgault whenever -R was used as optarg is NULL and it is dereferenced.

Signed-off-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd.c

index 0be251781bacaa562270f773341126bc95ca6b45..07b1e52e6b84e9bcba96e7a63b0505ca7823482a 100644 (file)
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
        char *progname;
 
        memset(ccachesearch, 0, sizeof(ccachesearch));
        char *progname;
 
        memset(ccachesearch, 0, sizeof(ccachesearch));
-       while ((opt = getopt(argc, argv, "fvrlmnMp:k:d:t:R")) != -1) {
+       while ((opt = getopt(argc, argv, "fvrlmnMp:k:d:t:R:")) != -1) {
                switch (opt) {
                        case 'f':
                                fg = 1;
                switch (opt) {
                        case 'f':
                                fg = 1;