From 922576e4525bb865efc1ae424140c6c0e547080a Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 21 Nov 2022 10:45:26 +0100 Subject: [PATCH] repart: Use ASSERT_PTR() in partition_encrypt() --- src/partition/repart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index aa8a99fe1a..8249a82043 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3154,8 +3154,8 @@ static int partition_target_sync(Context *context, Partition *p, PartitionTarget static int partition_encrypt(Context *context, Partition *p, const char *node) { #if HAVE_LIBCRYPTSETUP && HAVE_CRYPT_SET_DATA_OFFSET && HAVE_CRYPT_REENCRYPT_INIT_BY_PASSPHRASE && HAVE_CRYPT_REENCRYPT struct crypt_params_luks2 luks_params = { - .label = strempty(p->new_label), - .sector_size = context->sector_size, + .label = strempty(ASSERT_PTR(p)->new_label), + .sector_size = ASSERT_PTR(context)->sector_size, .data_device = node, }; struct crypt_params_reencrypt reencrypt_params = {