]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: don't overflow the subopts array
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 27 Sep 2017 01:41:12 +0000 (20:41 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 27 Sep 2017 01:41:12 +0000 (20:41 -0500)
The new -d cowextsize option overran the subopts array; make it larger.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
mkfs/xfs_mkfs.c

index 3058129409010e32c76b6a805bb16b1eb8d391db..5bfec038b61a50e8c67d55210887c12bec485901 100644 (file)
@@ -39,7 +39,7 @@ static int  ispow2(unsigned int i);
 unsigned int           blocksize;
 unsigned int           sectorsize;
 
-#define MAX_SUBOPTS    16
+#define MAX_SUBOPTS    17
 #define SUBOPT_NEEDS_VAL       (-1LL)
 #define MAX_CONFLICTS  8
 #define LAST_CONFLICT  (-1)