Revert "Squashfs: sanity check symbolic link size"

This reverts commit 56685ee756.
This commit is contained in:
Ksawlii 2024-11-24 00:23:38 +01:00
parent 0c4f581c2d
commit 367c3c0607

View file

@ -276,13 +276,8 @@ int squashfs_read_inode(struct inode *inode, long long ino)
if (err < 0)
goto failed_read;
inode->i_size = le32_to_cpu(sqsh_ino->symlink_size);
if (inode->i_size > PAGE_SIZE) {
ERROR("Corrupted symlink\n");
return -EINVAL;
}
set_nlink(inode, le32_to_cpu(sqsh_ino->nlink));
inode->i_size = le32_to_cpu(sqsh_ino->symlink_size);
inode->i_op = &squashfs_symlink_inode_ops;
inode_nohighmem(inode);
inode->i_data.a_ops = &squashfs_symlink_aops;