From 1272be04be0cb803eec87f602edb2e3e6f111aea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:34 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- libfdisk/src/sun.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libfdisk/src/sun.c') diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c index dde9750..cd965ab 100644 --- a/libfdisk/src/sun.c +++ b/libfdisk/src/sun.c @@ -35,7 +35,7 @@ struct fdisk_sun_label { struct sun_disklabel *header; /* on-disk data (pointer to cxt->firstsector) */ }; -static struct fdisk_parttype sun_parttypes[] = { +static const struct fdisk_parttype sun_parttypes[] = { {SUN_TAG_UNASSIGNED, N_("Unassigned")}, {SUN_TAG_BOOT, N_("Boot")}, {SUN_TAG_ROOT, N_("SunOS root")}, @@ -383,6 +383,10 @@ static void fetch_sun(struct fdisk_context *cxt, lens[i] = 0; } } + for (i = cxt->label->nparts_max; i < SUN_MAXPARTITIONS; i++) { + starts[i] = 0; + lens[i] = 0; + } } /* non-Linux qsort_r(3) has usually differently ordered arguments */ -- cgit v1.2.3