mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 02:18:38 +08:00
e2f1ccdefc
issue: in rwb_wrflush(): memmove(rwb->wrbuffer + padblocks * rwb->blocksize, rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize); when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is allocated rwb.wrmaxblock(rwb.wralignblocks) blocks. fix: Let us ensure that the wrblockstart in rwbuffer must be aligned according to wralignblocks after writing, so there is no need to perform memmove when flushing Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>