summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;