linux/fs/exfat/dir.c
Yang Wen 0eb24ad05a exfat: fix overflow in cluster-to-dentry conversion
The cluster-to-dentry calculation is performed as u32 and may overflow
and wrap around on large volumes. This can result in an incorrect
max_dentries value, causing readdir to stop early and omit directory
entries.

Cast nr_clusters to u64 before shifting to avoid the overflow.

Signed-off-by: Yang Wen <anmuxixixi@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2026-08-06 22:06:09 +09:00

1381 lines
33 KiB