diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-06 03:21:32 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-06 03:21:32 +0000 |
commit | b05c5948bc4ac52ff2baa7e4eaf5a979b4f7740e (patch) | |
tree | 279b9404ee1938fb394fef3d90753cb6fa1b9599 | |
parent | f9968a80bb86f7a3680b59ea67525081dc6fa23f (diff) | |
download | hercules-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
-rw-r--r-- | Changelog-Trunk.txt | 4 | ||||
-rw-r--r-- | src/map/guild.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 0baeab557..a5eb6ded9 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,10 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/06/06
+ * [Fixed]:
+ - Allocation of event_list in guild_npc_request_info to aCalloc so
+ memcpy(ev->name,event,strlen(event)) will have a null terminator. [Lance]
2006/06/05
* Fixed a crash when using SL_SMA and the "combo" ain't ready. [Skotlex]
* Hopefully fixed changing a mob's class causing them to get all sort of
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);
|