mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
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.
This commit is contained in:
committed by
Milan Broz
parent
c3a0cbfc85
commit
c34bee2009
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user