Skip to content

Commit 003f144

Browse files
red031000bp3tk0v
authored andcommitted
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
1 parent b443265 commit 003f144

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c)
643643
}
644644

645645
if (!c->x86_model_id[0])
646-
strcpy(c->x86_model_id, "Hammer");
646+
strscpy(c->x86_model_id, "Hammer");
647647

648648
#ifdef CONFIG_SMP
649649
/*

0 commit comments

Comments
 (0)