diff options
author | Emmanuel Garette <egarette@cadoles.com> | 2020-04-30 09:51:29 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-01 17:31:45 +0200 |
commit | db1442260a56963a8aa507787e71b97e5f08f17c (patch) | |
tree | 7d10cb814bcd101bf1571e6221e5454839aa90cc | |
parent | 843c631a8e6da3f26b965461ea23c2b90b13da08 (diff) | |
download | systemd-db1442260a56963a8aa507787e71b97e5f08f17c.tar.gz |
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
-rw-r--r-- | src/partition/repart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 3bbc8da3f1..bc9b12f167 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -714,7 +714,7 @@ static int context_grow_partitions_on_free_area(Context *context, FreeArea *a) { assert(p->new_size != UINT64_MAX); m = p->new_size + span; - xsz = partition_max_size(a->after); + xsz = partition_max_size(p); if (xsz != UINT64_MAX && m > xsz) m = xsz; |