diff options
-rw-r--r-- | sbin/disklabel/editor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 6039a04d8aa..c42544a636c 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -531,6 +531,7 @@ editor_allocspace(struct disklabel *lp_org) again: lp = &label; memcpy(lp, lp_org, sizeof(struct disklabel)); + lp->d_npartitions = MAXPARTITIONS; lastalloc = alloc_table[index].sz; alloc = malloc(lastalloc * sizeof(struct space_allocation)); if (alloc == NULL) |