From f1b2c802e672e5877cbdc2454767d0cff9df058e Mon Sep 17 00:00:00 2001 From: skyrim Date: Wed, 30 Jul 2014 22:43:26 +0200 Subject: [PATCH] Fix of a possible buffer overflow --- plugins/mapchooser.sma | 4 ++-- plugins/mapsmenu.sma | 4 ++-- plugins/ns/mapchooser.sma | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/mapchooser.sma b/plugins/mapchooser.sma index 52d16a0e..4d3116d2 100755 --- a/plugins/mapchooser.sma +++ b/plugins/mapchooser.sma @@ -198,7 +198,7 @@ public voteNextmap() if (++a >= g_mapNums) a = 0 g_nextName[g_mapVoteNum] = a - pos += format(menu[pos], charsmax(menu), "%d. %a^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a)); + pos += format(menu[pos], charsmax(menu) - pos, "%d. %a^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a)); mkeys |= (1<= g_mapNums) a = 0 g_nextName[g_mapVoteNum] = a - pos += format(menu[pos],511,"%d. %s^n",g_mapVoteNum+1,g_mapName[a]) + pos += format(menu[pos], charsmax(menu) - pos, "%d. %s^n", g_mapVoteNum + 1, g_mapName[a]) mkeys |= (1<