Files
mod-playerbots/src/strategy/actions
Alex Dcnh 0b1b0eaecc Core - Fix RTSC SeeSpellAction crash on malformed WorldPacket (#1841)
## Summary

This PR fixes the Crash 1 Source from Issue
[#1840](https://github.com/mod-playerbots/mod-playerbots/issues/1840)
posted in a @Regrad posted logs, in `SeeSpellAction::Execute` when an
RTSC "see spell" event arrives with an empty or malformed `WorldPacket`.
In that case the code used to read from the packet without any
validation, causing a `ByteBufferException` and a crash in the map
thread.

## Fix

- Reset the packet read position and check that the RTSC header
(castCount + spellId + castFlags) fits into the packet before reading.
- Wrap `SpellCastTargets::Read` in a `try { } catch (ByteBufferException
const&) { }` block so truncated RTSC payloads are handled gracefully.
- Check that `targets.GetDst()` is not `nullptr` before accessing its
position.

For valid RTSC packets the behavior is unchanged; malformed packets are
now safely ignored instead of crashing the server.

## Testing

- Sent bots to multiple locations using RTSC and verified they still
move as before.
- Reproduced the previous crash scenario with malformed RTSC packets:
the worldserver no longer crashes and the event is simply ignored.

---------

Co-authored-by: bash <hermensb@gmail.com>
Co-authored-by: bashermens <31279994+hermensbas@users.noreply.github.com>
2025-11-21 13:18:14 +01:00
..
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-10-20 14:12:14 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-11-05 21:10:17 +01:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-10-20 14:12:14 +02:00
2025-10-20 14:12:14 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-11-05 21:10:17 +01:00
2024-08-04 10:23:36 +08:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-09-30 15:19:44 +02:00
2025-11-05 21:10:17 +01:00
2025-09-30 15:19:44 +02:00