I affirm:
OS / platform the server is running (if known)
Windows / Linux (Affects all platforms)
Branch affected by issue
base
Steps to reproduce
- For the Logging Crash: Trigger a console warning log in a file with a name length between 13 and 31 characters (e.g.,
x106_bazaar_buy.cpp). Observe the map server instantly hard-crash to the desktop due to a buffer underflow in src/common/logging.cpp.
- For the Despawn Crash: Have a player unexpectedly disconnect or log out while transitioning zones with an active state-altering effect (like Sleep or Stun).
- Observe the map server crash due to a Use-After-Free violation in
src/map/status_effect_container.cpp.
Expected behavior
The map server should safely handle these events without crashing.
- In
logging.cpp, the q_formatter_flag has a hardcoded math bug subtracting 32 from strings > 12 chars. The threshold check needs to be changed from > 12 to > 32 (or greater than the actual string length).
- In
status_effect_container.cpp, ApplyStateAlteringEffects needs defensive null checks for the PAI pointer before destruction.
Applying these fixes locally has completely resolved these crashes.
I affirm:
OS / platform the server is running (if known)
Windows / Linux (Affects all platforms)
Branch affected by issue
baseSteps to reproduce
x106_bazaar_buy.cpp). Observe the map server instantly hard-crash to the desktop due to a buffer underflow insrc/common/logging.cpp.src/map/status_effect_container.cpp.Expected behavior
The map server should safely handle these events without crashing.
logging.cpp, theq_formatter_flaghas a hardcoded math bug subtracting 32 from strings > 12 chars. The threshold check needs to be changed from> 12to> 32(or greater than the actual string length).status_effect_container.cpp,ApplyStateAlteringEffectsneeds defensive null checks for thePAIpointer before destruction.Applying these fixes locally has completely resolved these crashes.