Skip to contentSkip to conversation

x86/cpu/intel: Replace deprecated strcpy() in init_intel()

PATCH New Thorsten Blum 1 participant 1 message Aug 16, 2025 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/cpu/intel: Replace deprecated strcpy() in init_intel()

strcpy() is deprecated; use strscpy() instead.

---
Note: I already submitted this in April as part of another patch [1] which doesn't apply anymore. Submitting this again as a separate patch. [1]: https://lore.kernel.org/lkml/[email protected]/

---
 arch/x86/kernel/cpu/intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/intel.c +1 -1
index 076eaa41b8c8..c4ea3325d3e7 100644
@@ -607,7 +607,7 @@ static void init_intel(struct cpuinfo_x86 *c)
 		}
 
 		if (p)
-			strcpy(c->x86_model_id, p);
+			strscpy(c->x86_model_id, p);
 	}
 #endif
 
Signature · 1 line
2.50.1