View Issue Details

IDProjectCategoryView StatusLast Update
0004941UBootU-Bootpublic2021-10-05 15:09
Reporterderksen Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Versionfsimx8mm-B2021.06 
Target Versionfsimx8mn-Y2021.09Fixed in Versionfsimx8mn-Y2021.09 
Summary0004941: In fat_fus.c, handle files > 2GB better
DescriptionIn fat_fus.c, handle files > 2GB better

In fat_size(), function file_fat_read() is called. This returns either
the size of the file or a negative error code. The previous comparison
with < 0 has problems if the file size exceeds 2GB. Then the size has
bit 31 set and is interpreted as a negative value and hence as an error
value.

Use IS_ERR_VALUE() instead, then only a few very large files with nearly
4GB will have problems.

Remark:
The function file_fat_read() is only called in very few places. Maybe
we can remove it completely and use file_fat_read_at() instead which
has a separate pointer for the size and does not mix it up with the
return value.
Forum Link

Activities

There are no notes attached to this issue.