From f5032b44ed645487cb692a766e2d91c042b55c9e Mon Sep 17 00:00:00 2001 From: mckusick Date: Fri, 18 Oct 2002 23:17:30 +0000 Subject: Bound the size of the superblock to SBLOCKSIZE. Submitted by: BOUWSMA Beery Sponsored by: DARPA & NAI Labs. --- sbin/newfs/mkfs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sbin/newfs') diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 90561ef..ff37368 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -382,6 +382,8 @@ mkfs(struct partition *pp, char *fsys) if (fscs == NULL) errx(31, "calloc failed"); sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs)); + if (sblock.fs_sbsize > SBLOCKSIZE) + sblock.fs_sbsize = SBLOCKSIZE; sblock.fs_minfree = minfree; sblock.fs_maxbpg = maxbpg; sblock.fs_optim = opt; -- cgit v1.1