From 27f65cdbb0c41ee0b595f01fbee8bf20e8821925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 3 Mar 2024 18:18:49 +0100 Subject: [PATCH] Fix client crash due to truncated skin name --- ddnet-libs | 2 +- src/game/server/teeinfo.h | 2 +- src/tools/demo_extract_chat.cpp | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ddnet-libs b/ddnet-libs index 4d796ea11..a4fbe0e52 160000 --- a/ddnet-libs +++ b/ddnet-libs @@ -1 +1 @@ -Subproject commit 4d796ea119b52c8901286e14ab96faf7353a5d59 +Subproject commit a4fbe0e52338a129bc3ac2e3a1de54de1d175279 diff --git a/src/game/server/teeinfo.h b/src/game/server/teeinfo.h index a2a72a46d..1200c0de8 100644 --- a/src/game/server/teeinfo.h +++ b/src/game/server/teeinfo.h @@ -6,7 +6,7 @@ class CTeeInfo public: constexpr static const float ms_DarkestLGT7 = 61 / 255.0f; - char m_aSkinName[64] = {'\0'}; + char m_aSkinName[24] = {'\0'}; int m_UseCustomColor = 0; int m_ColorBody = 0; int m_ColorFeet = 0; diff --git a/src/tools/demo_extract_chat.cpp b/src/tools/demo_extract_chat.cpp index c101b163f..53a5c439a 100644 --- a/src/tools/demo_extract_chat.cpp +++ b/src/tools/demo_extract_chat.cpp @@ -101,13 +101,8 @@ public: int ClientID = Item.m_ID; if(ClientID < MAX_CLIENTS) { -<<<<<<< HEAD CClientData *pClient = &m_aClients[ClientID]; - IntsToStr(&pInfo->m_Name0, 4, pClient->m_aName); -======= - CClientData *pClient = &m_aClients[ClientId]; int32_to_str(&pInfo->m_Name0, 4, pClient->m_aName, sizeof(pClient->m_aName)); ->>>>>>> 1138e763b (Add validation for `StrToInts` and `IntsToStr`, move and rename) } } }