lib: sbi: Fix timing of clearing tbuf
A single scan of the format char may add multiple characters to the tbuf, causing a buffer overflow. You should check if tbuf is full in printc so that it does not cause a buffer overflow. Signed-off-by:Xiang W <wxjstz@126.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
parent
cc89fa7b
Please register or sign in to comment