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 a362974..9988fe4 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: