repart: fix partition maximum size segfault
Discovered, tracked down and fix proposed by Emmanuel Garette. See: https://lists.freedesktop.org/archives/systemd-devel/2020-April/044435.html (Lennart turned this into a PR) Fixes: #15608
This commit is contained in:
parent
843c631a8e
commit
db1442260a
|
@ -714,7 +714,7 @@ static int context_grow_partitions_on_free_area(Context *context, FreeArea *a) {
|
||||||
assert(p->new_size != UINT64_MAX);
|
assert(p->new_size != UINT64_MAX);
|
||||||
m = p->new_size + span;
|
m = p->new_size + span;
|
||||||
|
|
||||||
xsz = partition_max_size(a->after);
|
xsz = partition_max_size(p);
|
||||||
if (xsz != UINT64_MAX && m > xsz)
|
if (xsz != UINT64_MAX && m > xsz)
|
||||||
m = xsz;
|
m = xsz;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue