mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-26 21:13:51 +00:00
fix(combatlog): validate packed resist log GUIDs
This commit is contained in:
parent
0968a11234
commit
468880e2c8
1 changed files with 8 additions and 2 deletions
|
|
@ -7044,10 +7044,16 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
auto rl_rem = [&]() { return packet.getSize() - packet.getReadPos(); };
|
auto rl_rem = [&]() { return packet.getSize() - packet.getReadPos(); };
|
||||||
if (rl_rem() < 4) { packet.setReadPos(packet.getSize()); break; }
|
if (rl_rem() < 4) { packet.setReadPos(packet.getSize()); break; }
|
||||||
/*uint32_t hitInfo =*/ packet.readUInt32();
|
/*uint32_t hitInfo =*/ packet.readUInt32();
|
||||||
if (rl_rem() < (rlUsesFullGuid ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; }
|
if (rl_rem() < (rlUsesFullGuid ? 8u : 1u)
|
||||||
|
|| (!rlUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||||
|
packet.setReadPos(packet.getSize()); break;
|
||||||
|
}
|
||||||
uint64_t attackerGuid = rlUsesFullGuid
|
uint64_t attackerGuid = rlUsesFullGuid
|
||||||
? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet);
|
? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet);
|
||||||
if (rl_rem() < (rlUsesFullGuid ? 8u : 1u)) { packet.setReadPos(packet.getSize()); break; }
|
if (rl_rem() < (rlUsesFullGuid ? 8u : 1u)
|
||||||
|
|| (!rlUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||||
|
packet.setReadPos(packet.getSize()); break;
|
||||||
|
}
|
||||||
uint64_t victimGuid = rlUsesFullGuid
|
uint64_t victimGuid = rlUsesFullGuid
|
||||||
? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet);
|
? packet.readUInt64() : UpdateObjectParser::readPackedGuid(packet);
|
||||||
if (rl_rem() < 4) { packet.setReadPos(packet.getSize()); break; }
|
if (rl_rem() < 4) { packet.setReadPos(packet.getSize()); break; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue