From 964d503988e76fe47908d70b247a0d06f5ca9897 Mon Sep 17 00:00:00 2001 From: SinnamonLat Date: Sat, 26 Feb 2022 10:45:27 +0100 Subject: [PATCH] Prevent profile player name from writing out of bounds --- src/k_menufunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 4f0a2ec64..c806446d1 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -3775,7 +3775,7 @@ void M_HandleProfileEdit(void) strncpy(optionsmenu.profile->profilename, cv_dummyprofilename.string, PROFILENAMELEN); if (strlen(cv_dummyprofileplayername.string)) - strcpy(optionsmenu.profile->playername, cv_dummyprofileplayername.string); + strncpy(optionsmenu.profile->playername, cv_dummyprofileplayername.string, MAXPLAYERNAME); } // special menuitem key handler for video mode list