diff options
author | shennetsind <ind@henn.et> | 2015-01-17 20:18:49 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-17 20:18:49 -0200 |
commit | a3c4d675ba19df385be5d1e3966c61de7186da57 (patch) | |
tree | 45b4a026a758afb1a54387cdadb91d55eba621f8 /src/map/mob.c | |
parent | 3e53a34615c2535dbed3d7c2c7a00f1ef3eaff0a (diff) | |
download | hercules-a3c4d675ba19df385be5d1e3966c61de7186da57.tar.gz hercules-a3c4d675ba19df385be5d1e3966c61de7186da57.tar.bz2 hercules-a3c4d675ba19df385be5d1e3966c61de7186da57.tar.xz hercules-a3c4d675ba19df385be5d1e3966c61de7186da57.zip |
27 Fixes
Addressing out of bounds read/write, pointless null checks on already deferenced variables.
Special Thanks to 4144 and Haruna!
Signed-off-by: shennetsind <ind@henn.et>
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 30a359bc7..0eb1a9833 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3894,7 +3894,7 @@ bool mob_parse_dbrow(char** str) { if (k == MAX_SEARCH) continue; - if (id->mob[k].id != class_) + if (id->mob[k].id != class_ && k != MAX_SEARCH - 1) memmove(&id->mob[k+1], &id->mob[k], (MAX_SEARCH-k-1)*sizeof(id->mob[0])); id->mob[k].chance = db->dropitem[i].p; id->mob[k].id = class_; |