nuttx/drivers/misc
dongjiuzhu1 e2f1ccdefc drivers/misc/rwbuffer: fix rwbuffer overflow issue
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>
2024-04-23 10:28:52 +08:00
..
addrenv.c
CMakeLists.txt
dev_ascii.c
dev_null.c
dev_zero.c
Kconfig rpmsg: make all the rpmsg services deponds on RPMSG 2024-02-18 04:09:34 -08:00
lwl_console.c
Make.defs
mkrd.c
optee_msg.h Remove @ and % tag from all comments 2023-12-11 17:00:10 -03:00
optee.c
ramdisk.c
rpmsgblk_server.c
rpmsgblk.c
rpmsgblk.h
rpmsgdev_server.c nuttx/list: rename container_of to list_container_of from public header 2024-02-29 19:44:54 +08:00
rpmsgdev.c
rpmsgdev.h
rwbuffer.c drivers/misc/rwbuffer: fix rwbuffer overflow issue 2024-04-23 10:28:52 +08:00