From c34bee20098188d457cd342dd24c4007ddc28994 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Tue, 19 Sep 2017 14:53:17 +0200 Subject: [PATCH] return correct key description format in dm_query_device dm_query_device is expected to return kernel key description string only. By mistake the code returned also type in head of key description. --- lib/libdevmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libdevmapper.c b/lib/libdevmapper.c index cb0b7c2e..56497be2 100644 --- a/lib/libdevmapper.c +++ b/lib/libdevmapper.c @@ -1272,7 +1272,7 @@ static int _dm_query_crypt(uint32_t get_flags, if (get_flags & DM_ACTIVE_CRYPT_KEY) { if (key_[0] == ':') { - dmd->u.crypt.key_description = strdup(strpbrk(key_ + 1, ":") + 1); + dmd->u.crypt.key_description = strdup(strpbrk(strpbrk(key_ + 1, ":") + 1, ":") + 1); if (!dmd->u.crypt.key_description) { r = -ENOMEM; goto err;