]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Fix an off-by-one in the handling of the -d option to rpc.gssd
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 4 Feb 2007 22:53:14 +0000 (09:53 +1100)
committerNeil Brown <neilb@suse.de>
Sun, 4 Feb 2007 22:53:14 +0000 (09:53 +1100)
 https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/76409

utils/gssd/gssd.c

index a362974a92438ad09ba92bca2d2d41fb2a183a89..9988fe4ab6f85f04f93fdeda78fbd095f2fb595f 100644 (file)
@@ -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: