mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 20:03:33 -04:00
hfsplus: return EIO when type of hidden directory mismatch in hfsplus_fill_super()
[ Upstream commit 9282bc905f0949fab8cf86c0f620ca988761254c ] If Catalog File contains corrupted record for the case of hidden directory's type, regard it as I/O error instead of Invalid argument. Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com> Link: https://lore.kernel.org/r/20250805165905.3390154-1-frank.li@vivo.com Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fc56548fca
commit
7e173b4ee1
1 changed files with 1 additions and 1 deletions
|
|
@ -539,7 +539,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
|
|||
if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
|
||||
hfs_find_exit(&fd);
|
||||
if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) {
|
||||
err = -EINVAL;
|
||||
err = -EIO;
|
||||
goto out_put_root;
|
||||
}
|
||||
inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));
|
||||
|
|
|
|||
Loading…
Reference in a new issue