From fb08950c19b2b6e1ff07d5b5507dab086622cae3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 14 Nov 2018 16:32:57 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20stringop-truncation:=20=E2=80=98strncpy?= =?UTF-8?q?=E2=80=99=20output=20truncated=20before=20terminating=20nul=20c?= =?UTF-8?q?opying=208=20bytes=20from=20a=20string=20of=20the=20same=20leng?= =?UTF-8?q?th?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/r_things.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index 910a52b3..ee2d8a9b 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2323,7 +2323,7 @@ static void Sk_SetDefaultValue(skin_t *skin) strcpy(skin->realname, "Someone"); strcpy(skin->hudname, "???"); - strncpy(skin->charsel, "CHRSONIC", 8); + strncpy(skin->charsel, "CHRSONIC", 9); strncpy(skin->face, "MISSING", 8); strncpy(skin->superface, "MISSING", 8); @@ -2384,9 +2384,9 @@ void R_InitSkins(void) strcpy(skin->realname, "Sonic"); strcpy(skin->hudname, "SONIC"); - strncpy(skin->charsel, "CHRSONIC", 8); - strncpy(skin->face, "LIVSONIC", 8); - strncpy(skin->superface, "LIVSUPER", 8); + strncpy(skin->charsel, "CHRSONIC", 9); + strncpy(skin->face, "LIVSONIC", 9); + strncpy(skin->superface, "LIVSUPER", 9); skin->prefcolor = SKINCOLOR_BLUE; skin->ability = CA_THOK;