diff options
author | Daniel Thompson <[email protected]> | 2024-04-24 15:03:40 +0100 |
---|---|---|
committer | Daniel Thompson <[email protected]> | 2024-04-26 17:13:31 +0100 |
commit | 64d504cfcd514743aaed3a5b79c060f0143149e9 (patch) | |
tree | 2ea9733a1a8177632268c40f2d7bf4a6989e7ff3 /lib/test_fortify/write_overflow-strncpy.c | |
parent | 80bd73c154e3063c4f9293163daf3262335f9f86 (diff) |
kdb: Simplify management of tmpbuffer in kdb_read()
The current approach to filling tmpbuffer with completion candidates is
confusing, with the buffer management being especially hard to reason
about. That's because it doesn't copy the completion canidate into
tmpbuffer, instead of copies a whole bunch of other nonsense and then
runs the completion search from the middle of tmpbuffer!
Change this to copy nothing but the completion candidate into tmpbuffer.
Pretty much everything else in this patch is renaming to reflect the
above change:
s/p_tmp/tmpbuffer/
s/buf_size/sizeof(tmpbuffer)/
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]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions