summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-29 16:48:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-29 16:48:33 +0300
commit40b2a0917977a1f0fe761497a7f9d280e2f97a7d (patch)
treeeb8442b39f862cf65a160f9587835a0e906b8fcf /src/map/intif.c
parente9cc77486c96b0177dae130a74bafe967569033b (diff)
downloadhercules-40b2a0917977a1f0fe761497a7f9d280e2f97a7d.tar.gz
hercules-40b2a0917977a1f0fe761497a7f9d280e2f97a7d.tar.bz2
hercules-40b2a0917977a1f0fe761497a7f9d280e2f97a7d.tar.xz
hercules-40b2a0917977a1f0fe761497a7f9d280e2f97a7d.zip
Fix buffer overflow in guild notice change packet.
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index d20afbb08..7d2493d46 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -837,8 +837,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
WFIFOHEAD(inter_fd,186);
WFIFOW(inter_fd,0)=0x303e;
WFIFOL(inter_fd,2)=guild_id;
- memcpy(WFIFOP(inter_fd,6),mes1,MAX_GUILDMES1);
- memcpy(WFIFOP(inter_fd,66),mes2,MAX_GUILDMES2);
+ safestrncpy(WFIFOP(inter_fd, 6), mes1, MAX_GUILDMES1);
+ safestrncpy(WFIFOP(inter_fd, 66), mes2, MAX_GUILDMES2);
WFIFOSET(inter_fd,186);
return 0;
}