From 89151f5dda1df2d84f2e39dc08a11833cb7dd7eb Mon Sep 17 00:00:00 2001 From: Yimura Date: Fri, 1 Jan 2021 01:03:15 +0100 Subject: [PATCH] fix(Hooking->GetEventData): type char array allocation too small --- BigBaseV2/src/hooks/get_event_data.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BigBaseV2/src/hooks/get_event_data.cpp b/BigBaseV2/src/hooks/get_event_data.cpp index 72d43830..20728c34 100644 --- a/BigBaseV2/src/hooks/get_event_data.cpp +++ b/BigBaseV2/src/hooks/get_event_data.cpp @@ -14,7 +14,7 @@ namespace big Player player = (Player)args[1]; auto hash = args[0]; - char type[16] = ""; + char type[32] = ""; switch (hash) { @@ -95,10 +95,14 @@ namespace big break; } + for (int64_t kick_hash : kick_hashes) + if (hash == kick_hash) + strcpy(type, "General Kick"); + if (strlen(type) != 0) { char msg[128]; - strcpy(msg, "~g~BLOCKED EVENT~s~\nFrom "); + strcpy(msg, "~g~BLOCKED EVENT~s~\nFrom: "); strcat(msg, g_pointers->m_get_player_name(player)); strcat(msg, "\nEvent Type: ~b~"); strcat(msg, type);