summaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-30 15:51:43 -0700
committerTheodore Ts'o <tytso@mit.edu>2018-05-20 16:21:03 -0400
commit0c4cdb27caa40167a7369a986afcde3d1d913b06 (patch)
tree8f7747e41b02a9046b6461b57f8165b0714131d3 /fs/crypto
parent54632f02d0cc4e47e20d0d742bf162021801fa9a (diff)
fscrypt: drop empty name check from fname_decrypt()
fname_decrypt() is validating that the encrypted filename is nonempty. However, earlier a stronger precondition was already enforced: the encrypted filename must be at least 16 (FS_CRYPTO_BLOCK_SIZE) bytes. Drop the redundant check for an empty filename. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/fname.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c
index cc9590b5f371..c4eb3a235ae4 100644
--- a/fs/crypto/fname.c
+++ b/fs/crypto/fname.c
@@ -97,9 +97,6 @@ static int fname_decrypt(struct inode *inode,
int res = 0;
char iv[FS_CRYPTO_BLOCK_SIZE];
- if (iname->len <= 0)
- return -EIO;
-
/* Allocate request */
req = skcipher_request_alloc(tfm, GFP_NOFS);
if (!req)