Commit 8790cc2
kdb: Replace deprecated strcpy() with memmove() in vkdb_printf()
strcpy() is deprecated and its behavior is undefined when the source and
destination buffers overlap. Use memmove() instead to avoid any
undefined behavior.
Adjust comments for clarity.
Link: KSPP#88
Fixes: 5d5314d ("kdb: core for kgdb back end (1 of 2)")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Daniel Thompson (RISCstar) <danielt@kernel.org>1 parent d4be323 commit 8790cc2
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | | - | |
| 717 | + | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
736 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
737 | 738 | | |
738 | 739 | | |
739 | 740 | | |
| |||
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
875 | | - | |
876 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
| |||
0 commit comments