diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2013-04-19 14:10:21 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2013-04-19 14:10:21 +0000 |
commit | 897e48d28a35ff8250ea8968c9e9dbfd2099db57 (patch) | |
tree | 21a64f10bcd15fe1096cf89f2d8b0a1170baf4d8 /sbin/disklabel/editor.c | |
parent | 027196bbd1e91b7d42ebe2b4622ebbd5d3ca94f3 (diff) |
make sure the fs blocksize doesn't get too big; ok krw@
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r-- | sbin/disklabel/editor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index ebdef6f692a..1c6936bc645 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.269 2012/07/13 16:06:42 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.270 2013/04/19 14:10:20 otto Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -903,6 +903,8 @@ editor_add(struct disklabel *lp, char *p) fragsize *= 2; if (new_size > 512ULL * 1024 * 1024 * 1024) fragsize *= 2; + if (fragsize > MAXBSIZE / 8) + fragsize = MAXBSIZE / 8; #if defined (__sparc__) && !defined(__sparc64__) /* can't boot from > 8k boot blocks */ pp->p_fragblock = |