linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0007-Use-MAXIMUM_PARTS-instead-of-VLA.patch
(918B)
1 From abcdd92972cc92840e8db22d7018c44dbb9ec2f4 Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Mon, 24 Jun 2019 23:41:53 -0700
4 Subject: [PATCH] Use MAXIMUM_PARTS instead of VLA
5
6 This is the upper bound on the pte array, so just use it as the
7 static array length.
8 ---
9 libfdisk/src/dos.c | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
11
12 diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
13 index 7a1f6ea34..967b7bd19 100644
14 --- a/libfdisk/src/dos.c
15 +++ b/libfdisk/src/dos.c
16 @@ -1624,8 +1624,7 @@ static int dos_verify_disklabel(struct fdisk_context *cxt)
17 {
18 size_t i, j;
19 fdisk_sector_t total = 1, n_sectors = cxt->total_sectors;
20 - fdisk_sector_t first[cxt->label->nparts_max],
21 - last[cxt->label->nparts_max];
22 + fdisk_sector_t first[MAXIMUM_PARTS], last[MAXIMUM_PARTS];
23 struct dos_partition *p;
24 struct fdisk_dos_label *l = self_label(cxt);
25 int nerrors = 0;
26 --
27 2.28.0
28