summaryrefslogtreecommitdiff
path: root/doc/uImage.FIT/update_uboot.its
diff options
context:
space:
mode:
authorReno Farnesi <nfarnesi4@gmail.com>2017-08-13 15:16:17 -0400
committerTom Rini <trini@konsulko.com>2017-08-26 14:56:07 -0400
commit76216211f842677bac10000bfdbae1155172ddd6 (patch)
treee61f208578e0f134e99501753545e89d8a16c424 /doc/uImage.FIT/update_uboot.its
parent528f2b66dc7b8485c4db793b65b25c489e8c8518 (diff)
fs: fat: fix fatwrite overflow calculation
The overflow calculation was incorrect. Adding the start block of the partition is not needed because the sectors are already relative to the beginning of the partition. If you attempted to write a file smaller than cur_part_info.start blocks on a full partition the old calculation fails to catch the overflow. This would cause an infinite loop in the determine_fatent function. Old, incorrect calculation: ending sector of new file = start sector + file size (in sectors) last sector = partition start + total sectors on the partition Adding the partition start block number is not needed because sectors are already relative to the start of the partition. New calculation: ending sector of new file = start sector + file size (in sectors) last sector = total sectors on the partition Signed-off-by: Reno Farnesi <nfarnesi4@gmail.com>
Diffstat (limited to 'doc/uImage.FIT/update_uboot.its')
0 files changed, 0 insertions, 0 deletions