diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-25 17:41:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-31 23:06:27 +0300 |
commit | a71a056abb8931aa4a11d0cde296fe9de68ee6df (patch) | |
tree | 0ebda387e185404e2670a0c6f81b38b2cd1dbc95 /src/map/mob.c | |
parent | db5fd3795cba3d30bb3d031719a272eec23cd586 (diff) | |
download | hercules-a71a056abb8931aa4a11d0cde296fe9de68ee6df.tar.gz hercules-a71a056abb8931aa4a11d0cde296fe9de68ee6df.tar.bz2 hercules-a71a056abb8931aa4a11d0cde296fe9de68ee6df.tar.xz hercules-a71a056abb8931aa4a11d0cde296fe9de68ee6df.zip |
Fix possible memory overflows and underflows.
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 4db8cb2f6..96ee83d3b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4324,7 +4324,7 @@ bool mob_parse_row_mobskilldb(char** str, int columns, int current) if( strcmp(str[1],"clear")==0 ){ if (mob_id < 0) return false; - memset(mob->db_data[mob_id]->skill,0,sizeof(struct mob_skill)); + memset(mob->db_data[mob_id]->skill,0,sizeof(struct mob_skill) * MAX_MOBSKILL); mob->db_data[mob_id]->maxskill=0; return true; } |