aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2015-11-26 15:20:50 -0500
committerMister Oyster <oysterized@gmail.com>2017-12-31 01:44:56 +0100
commitf556a9fb4fbe2e4904fe4b10bef9e653690c18b0 (patch)
tree1e9f7d6a041a8d21ec80694a06ddcb8cfabcdc36 /fs
parentfdf9dd5e3c41954d347328047cd65270af43fbe2 (diff)
ext4: fix an endianness bug in ext4_encrypted_follow_link()
applying le32_to_cpu() to 16bit value is a bad idea... Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/symlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index 4f68e83cd..40169ed8e 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -56,7 +56,7 @@ static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
/* Symlink is encrypted */
sd = (struct ext4_encrypted_symlink_data *)caddr;
cstr.name = sd->encrypted_path;
- cstr.len = le32_to_cpu(sd->len);
+ cstr.len = le16_to_cpu(sd->len);
if ((cstr.len +
sizeof(struct ext4_encrypted_symlink_data) - 1) >
max_size) {