1 ext4: do not unnecessarily null-terminate encrypted symlink data
3 From: Eric Biggers <ebiggers@google.com>
5 Null-terminating the fscrypt_symlink_data on read is unnecessary because
6 it is not string data --- it contains binary ciphertext.
8 Signed-off-by: Eric Biggers <ebiggers@google.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 fs/ext4/symlink.c | 2 --
12 1 file changed, 2 deletions(-)
14 diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
15 index 0a26cbd..fdf1c61 100644
16 --- a/fs/ext4/symlink.c
17 +++ b/fs/ext4/symlink.c
18 @@ -30,7 +30,6 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
19 char *caddr, *paddr = NULL;
20 struct fscrypt_str cstr, pstr;
21 struct fscrypt_symlink_data *sd;
22 - loff_t size = min_t(loff_t, i_size_read(inode), PAGE_SIZE - 1);
24 u32 max_size = inode->i_sb->s_blocksize;
26 @@ -49,7 +48,6 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
28 return ERR_CAST(cpage);
29 caddr = page_address(cpage);
33 /* Symlink is encrypted */
35 2.8.0.rc3.226.g39d4020
38 To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
39 the body of a message to majordomo@vger.kernel.org
40 More majordomo info at http://vger.kernel.org/majordomo-info.html