mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
fix(combatlog): validate packed GUID bounds in spell start parser
This commit is contained in:
parent
c9858655f6
commit
4561eb8696
1 changed files with 7 additions and 0 deletions
|
|
@ -3683,7 +3683,14 @@ bool SpellStartParser::parse(network::Packet& packet, SpellStartData& data) {
|
|||
if (packet.getSize() - packet.getReadPos() < 22) return false;
|
||||
|
||||
size_t startPos = packet.getReadPos();
|
||||
if (!hasFullPackedGuid(packet)) {
|
||||
return false;
|
||||
}
|
||||
data.casterGuid = UpdateObjectParser::readPackedGuid(packet);
|
||||
if (!hasFullPackedGuid(packet)) {
|
||||
packet.setReadPos(startPos);
|
||||
return false;
|
||||
}
|
||||
data.casterUnit = UpdateObjectParser::readPackedGuid(packet);
|
||||
|
||||
// Validate remaining fixed fields (castCount + spellId + castFlags + castTime = 9 bytes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue