summaryrefslogtreecommitdiff
path: root/ubifs-utils
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-10-18 16:37:14 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-01 12:42:19 +0100
commitcef0495f7a536256252a559c88266c8d272bfdb1 (patch)
treed265b2638f2bc440cc5c74ead01f2fd39a471e74 /ubifs-utils
parenta5bdf343b75bc9a1e24734166b016706b54ce0e7 (diff)
mkfs.ubifs: More fscryptctl compatibility
fscryptctl reads up to FS_MAX_KEY_SIZE bytes from the source key to compute the descriptor. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils')
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 29dad1b..3d4bff6 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -202,7 +202,7 @@ static int load_master_key(const char *key_file, struct cipher *fsc)
return -1;
}
- keysize = read(kf, fscrypt_masterkey, fsc->key_length);
+ keysize = read(kf, fscrypt_masterkey, FS_MAX_KEY_SIZE);
if (keysize < 0) {
sys_errmsg("read '%s'", key_file);
goto fail;