Issue information

Issue ID
#3229
Status
Fixed
Severity
Medium
Started
Hercules Elf Bot
Jun 11, 2009 12:34
Last Post
Hercules Elf Bot
Jun 11, 2009 12:34
Confirmation
N/A

Hercules Elf Bot - Jun 11, 2009 12:34

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3229

The extended functionality, which allows gm-kicking mobs (kills them) and npcs (unloads them), also introduced two points of crash.

The reasoning is simple. When a non-respawning mob is killed, it is wiped from memory. Similarly, when a npc is unloaded, it is wiped from memory. Any references to them become invalid.

However, in clif_parse_GMKick(), some logging code follows the kill/unload operation, and it attempts to access the mob/npc's data. This will lead to reading junk values in the best case, and a segfault in the worst case.

Timeline:
kicking mobs: pre-svn
logging mobs: r9334 (!)
kicking npcs: r12073 (!)