From: Simo Sorce Date: Tue, 2 Apr 2013 19:06:13 +0000 (-0400) Subject: gssd: Fix segfault when using -R option X-Git-Tag: debian/1%1.2.8-1~11^2^2~11 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0ce973a59ab3393481ba7c434a7353b5007cba71;p=nfs-utils.git gssd: Fix segfault when using -R option 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 Signed-off-by: Steve Dickson --- diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index 0be2517..07b1e52 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -102,7 +102,7 @@ main(int argc, char *argv[]) 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;