diff mbox

mkfs: don't overflow the subopts array

Message ID 20170927013828.GM5020@magnolia (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Darrick J. Wong Sept. 27, 2017, 1:38 a.m. UTC
The new -d cowextsize option overran the subopts array; make it larger.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 mkfs/xfs_mkfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eric Sandeen Sept. 27, 2017, 1:40 a.m. UTC | #1
On 9/26/17 8:38 PM, Darrick J. Wong wrote:
> The new -d cowextsize option overran the subopts array; make it larger.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Sigh, sorry for missing that on review, and build, and build, and another build. :(

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  mkfs/xfs_mkfs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 2acf8bf..7c407b0 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -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)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 2acf8bf..7c407b0 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -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)