Commit 436aec7
committed
exfat: handle wrong stream entry size in exfat_readdir()
The compatibility between linux exfat and exfat of some camera company
was reported as a problem. In their exfat, if the number of files
exceeds any limit, the DataLength in stream entry of the directory is
not updated. There is a problem that some files created from camera
does not show in linux exfat. In linux exfat, if cpos becomes larger than
stream entry size, there is a check not to call exfat_readdir().
This patch check stream entry size only if it is ALLOC_NO_FAT_CHAIN and
add the check ensure that the number of dentry does not exceed max dentries
size(256 MB) to prevent the circular FAT chain issue.
Reported-by: Florian Cramer <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>1 parent a52427b commit 436aec7
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
249 | | - | |
| 254 | + | |
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
| |||
0 commit comments