Imported Debian patch 1.0.10-6~quilt.7
[nfs-utils.git] / debian / patches / 10-ccachedir-off-by-one.patch
1 Index: nfs-utils-1.0.10/utils/gssd/gssd.c
2 ===================================================================
3 --- nfs-utils-1.0.10.orig/utils/gssd/gssd.c
4 +++ nfs-utils-1.0.10/utils/gssd/gssd.c
5 @@ -118,7 +118,7 @@ main(int argc, char *argv[])
6                                 break;
7                         case 'd':
8                                 strncpy(ccachedir, optarg, sizeof(ccachedir));
9 -                               if (ccachedir[sizeof(ccachedir-1)] != '\0')
10 +                               if (ccachedir[sizeof(ccachedir)-1] != '\0')
11                                         errx(1, "ccachedir path name too long");
12                                 break;
13                         default: