From 410e04c2562f7d7dd9a2f242d6ef821dbe0b2fc5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 28 May 2020 03:21:59 +0300 Subject: Fix possible crash in mapif_guild_withdraw --- src/char/mapif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/char') diff --git a/src/char/mapif.c b/src/char/mapif.c index f0c886586..ed0133da3 100644 --- a/src/char/mapif.c +++ b/src/char/mapif.c @@ -559,7 +559,7 @@ static int mapif_guild_withdraw(int guild_id, int account_id, int char_id, int f WBUFL(buf, 6) = account_id; WBUFL(buf, 10) = char_id; WBUFB(buf, 14) = flag; - memcpy(WBUFP(buf, 15), mes, 40); + safestrncpy(WBUFP(buf, 15), mes, 40); memcpy(WBUFP(buf, 55), name, NAME_LENGTH); mapif->sendall(buf, 55 + NAME_LENGTH); ShowInfo("int_guild: guild withdraw (%d - %d: %s - %s)\n", guild_id, account_id, name, mes); -- cgit v1.2.3-70-g09d2