diff options
author | Ruben Wauters <rubenru09@aol.com> | 2025-04-30 00:03:59 +0100 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-04-30 19:32:36 +0200 |
commit | 003f144ca04621e598fc1c5c4ce0a851cddfe104 (patch) | |
tree | 93c3d618a170133003c2f22e22a2a114a3b4909c | |
parent | b4432656b36e5cc1d50a1f2dc15357543add530e (diff) |
x86/CPU/AMD: Replace strcpy() with strscpy()
strcpy() is deprecated due to issues with bounds checking and overflows.
Replace it with strscpy().
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250429230710.54014-1-rubenru09@aol.com
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 2b36379ff675..0feb717a3624 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -643,7 +643,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c) } if (!c->x86_model_id[0]) - strcpy(c->x86_model_id, "Hammer"); + strscpy(c->x86_model_id, "Hammer"); #ifdef CONFIG_SMP /* |