34 lines
980 B
Diff
34 lines
980 B
Diff
|
|
From 5672ba4fb56cce00615b235210d3801a0353c42f Mon Sep 17 00:00:00 2001
|
||
|
|
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
|
||
|
|
Date: Sun, 24 Dec 2023 13:32:56 +0100
|
||
|
|
Subject: [PATCH] libfdisk: (sun) properly initialize partition data
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
|
||
|
|
Reference:https://github.com/util-linux/util-linux/commit/5672ba4fb56cce00615b235210d3801a0353c42f
|
||
|
|
Conflict:NA
|
||
|
|
---
|
||
|
|
libfdisk/src/sun.c | 4 ++++
|
||
|
|
1 file changed, 4 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
|
||
|
|
index dde9750a0..66fd22380 100644
|
||
|
|
--- a/libfdisk/src/sun.c
|
||
|
|
+++ b/libfdisk/src/sun.c
|
||
|
|
@@ -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 */
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|