]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (sun) properly initialize partition data
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 24 Dec 2023 12:32:56 +0000 (13:32 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 31 Dec 2023 12:06:02 +0000 (13:06 +0100)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libfdisk/src/sun.c

index dde9750a0e535b33b260f72b45ef3995d634af22..66fd223808160d155f0f86e18b3f32deaea350a5 100644 (file)
@@ -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 */