summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2022-04-04 15:17:56 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2022-04-07 10:39:50 +0200
commitfc89cc76804499eba3f3bc4097b795a84f07571a (patch)
treef600b02b6b72f96dde85930c3c3e5b2cd5170f21 /bootstrap
parentbsp/atsam: Improve UART / USART tx performance (diff)
downloadrtems-fc89cc76804499eba3f3bc4097b795a84f07571a.tar.bz2
imfs: Fix index underrun when extending empty file
Currently the following sequence causes a endless loop when extending an IMFS file: - Create a file with zero length and close it. - Make sure nearly no allocatable memory is left. - Open the file and write enough data into it that more than the remaining memory will be used. In that case when extending the IMFS file, the file currently need zero blocks. If allocating enough new blocks fails, the already allocated new blocks will be freed again. The comparison of block>=old_blocks that has been used prior to this patch compared two unsigned numbers. If old_blocks was zero, the comparison of these two numbers always evaluated to true. This patch frees the last block in a separate step to avoid this problem. Fixes #4638
Diffstat (limited to 'bootstrap')
0 files changed, 0 insertions, 0 deletions