Message ID | 1454981657-25473-4-git-send-email-jaegeuk@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/f2fs/crypto_fname.c b/fs/f2fs/crypto_fname.c index e7aa67c..905c065 100644 --- a/fs/f2fs/crypto_fname.c +++ b/fs/f2fs/crypto_fname.c @@ -317,7 +317,10 @@ int f2fs_fname_disk_to_usr(struct inode *inode, oname->len = iname->len; return oname->len; } - + if (iname->len < F2FS_CRYPTO_BLOCK_SIZE) { + printk("encrypted inode too small"); + return -EUCLEAN; + } if (F2FS_I(inode)->i_crypt_info) return f2fs_fname_decrypt(inode, iname, oname);