From: Steinar H. Gunderson Date: Sun, 4 Feb 2007 22:53:14 +0000 (+1100) Subject: Fix an off-by-one in the handling of the -d option to rpc.gssd X-Git-Tag: nfs-utils-1-0-11~25 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=b6b8309bf93ad1c03cf1e9f2ec8634ea2542c289 Fix an off-by-one in the handling of the -d option to rpc.gssd https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/76409 --- diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index a362974..9988fe4 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -122,7 +122,7 @@ main(int argc, char *argv[]) break; case 'd': strncpy(ccachedir, optarg, sizeof(ccachedir)); - if (ccachedir[sizeof(ccachedir-1)] != '\0') + if (ccachedir[sizeof(ccachedir)-1] != '\0') errx(1, "ccachedir path name too long"); break; default: