mkfs: don't overflow the subopts array
PATCH 1/1 mkfs: don't overflow the subopts array
The new -d cowextsize option overran the subopts array; make it larger.
Signed-off-by Darrick J. Wong <[email protected]>
--- mkfs/xfs_mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/xfs_mkfs.c +1 -1
@@ -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)
Quoted 3 lines · Darrick J. Wong
The new -d cowextsize option overran the subopts array; make it larger.
Signed-off-by Darrick J. Wong <[email protected]>
Sigh, sorry for missing that on review, and build, and build, and another build. :(
Reviewed-by Eric Sandeen <[email protected]>
Quoted 18 lines
--- mkfs/xfs_mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mkfs/xfs_mkfs.c +1
-1@@ -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)