summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-06 03:21:32 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-06 03:21:32 +0000
commitb05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e (patch)
tree279b9404ee1938fb394fef3d90753cb6fa1b9599 /src
parentf9968a80bb86f7a3680b59ea67525081dc6fa23f (diff)
downloadhercules-b05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e.tar.gz
hercules-b05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e.tar.bz2
hercules-b05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e.tar.xz
hercules-b05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e.zip
* [Fixed]:
- Allocation of event_list in guild_npc_request_info to aCalloc so memcpy(ev->name,event,strlen(event)) will have a null terminator. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7001 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/guild.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 5364fb8bd..80d1e2fde 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -482,8 +482,8 @@ int guild_npc_request_info(int guild_id,const char *event)
if(event==NULL || *event==0)
return guild_request_info(guild_id);
- ev=(struct eventlist *)aMalloc(sizeof(struct eventlist));
- memcpy(ev->name,event,strlen(event));
+ ev=(struct eventlist *)aCalloc(sizeof(struct eventlist));
+ memcpy(ev->name,event,strlen(event) + 1);
//The one in the db becomes the next event from this.
ev->next=idb_put(guild_infoevent_db,guild_id,ev);
return guild_request_info(guild_id);