android_kernel_motorola_sm6375/kernel/debug
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Thompson 6b84387afe kdb: Use format-specifiers rather than memset() for padding in kdb_read()
commit c9b51ddb66b1d96e4d364c088da0f1dfb004c574 upstream.

Currently when the current line should be removed from the display
kdb_read() uses memset() to fill a temporary buffer with spaces.
The problem is not that this could be trivially implemented using a
format string rather than open coding it. The real problem is that
it is possible, on systems with a long kdb_prompt_str, to write past
the end of the tmpbuffer.

Happily, as mentioned above, this can be trivially implemented using a
format string. Make it so!

Cc: [email protected]
Reviewed-by: Douglas Anderson <[email protected]>
Tested-by: Justin Stitt <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Thompson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2024-06-16 13:28:52 +02:00
..
kdb kdb: Use format-specifiers rather than memset() for padding in kdb_read() 2024-06-16 13:28:52 +02:00
debug_core.c kgdb: Flush console before entering kgdb on panic 2023-11-28 16:50:16 +00:00
debug_core.h
gdbstub.c
Makefile