diff options
Diffstat (limited to 'fs/ecryptfs/crypto.c')
-rw-r--r-- | fs/ecryptfs/crypto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index a9ca373c6107..e890d596da7e 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -1426,10 +1426,10 @@ static int parse_header_metadata(struct ecryptfs_crypt_stat *crypt_stat, | |||
1426 | u32 header_extent_size; | 1426 | u32 header_extent_size; |
1427 | u16 num_header_extents_at_front; | 1427 | u16 num_header_extents_at_front; |
1428 | 1428 | ||
1429 | memcpy(&header_extent_size, virt, 4); | 1429 | memcpy(&header_extent_size, virt, sizeof(u32)); |
1430 | header_extent_size = be32_to_cpu(header_extent_size); | 1430 | header_extent_size = be32_to_cpu(header_extent_size); |
1431 | virt += 4; | 1431 | virt += sizeof(u32); |
1432 | memcpy(&num_header_extents_at_front, virt, 2); | 1432 | memcpy(&num_header_extents_at_front, virt, sizeof(u16)); |
1433 | num_header_extents_at_front = be16_to_cpu(num_header_extents_at_front); | 1433 | num_header_extents_at_front = be16_to_cpu(num_header_extents_at_front); |
1434 | crypt_stat->num_header_extents_at_front = | 1434 | crypt_stat->num_header_extents_at_front = |
1435 | (int)num_header_extents_at_front; | 1435 | (int)num_header_extents_at_front; |