summaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2024-04-24 15:03:38 +0100
committerDaniel Thompson <daniel.thompson@linaro.org>2024-04-26 17:13:30 +0100
commitc9b51ddb66b1d96e4d364c088da0f1dfb004c574 (patch)
tree71ad387050acccda44f2dff7419220694ec72c21 /kernel/pid.c
parent6244917f377bf64719551b58592a02a0336a7439 (diff)
downloadlinux-stable-c9b51ddb66b1d96e4d364c088da0f1dfb004c574.tar.gz
linux-stable-c9b51ddb66b1d96e4d364c088da0f1dfb004c574.tar.bz2
linux-stable-c9b51ddb66b1d96e4d364c088da0f1dfb004c574.zip
kdb: Use format-specifiers rather than memset() for padding in kdb_read()
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: stable@vger.kernel.org Reviewed-by: Douglas Anderson <dianders@chromium.org> Tested-by: Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20240424-kgdb_read_refactor-v3-5-f236dbe9828d@linaro.org Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'kernel/pid.c')
0 files changed, 0 insertions, 0 deletions