game: fix Classic/TBC SMSG_GROUP_LIST parsing - missing roles byte

WotLK 3.3.5a added a group-level and per-member roles byte (tank/healer/dps)
for the Dungeon Finder system. Classic 1.12 and TBC 2.4.3 do not send this byte.

The previous GroupListParser always read the roles byte, causing a one-byte
misalignment in Classic/TBC group lists that corrupted member GUID reads and
all subsequent fields (loot method, leader GUID, etc.).

GroupListParser::parse now takes a hasRoles parameter (default true for
backward compatibility). handleGroupList passes hasRoles=isActiveExpansion("wotlk").
Also adds range-checking throughout to prevent out-of-bounds reads on
malformed or unexpectedly short group list packets.
This commit is contained in:
Kelsi 2026-03-10 00:58:56 -07:00
parent 04f22376ce
commit a0979b9cd8
3 changed files with 66 additions and 26 deletions

View file

@ -13260,7 +13260,10 @@ void GameHandler::handleGroupDecline(network::Packet& packet) {
}
void GameHandler::handleGroupList(network::Packet& packet) {
if (!GroupListParser::parse(packet, partyData)) return;
// WotLK 3.3.5a added a roles byte (group level + per-member) for the dungeon finder.
// Classic 1.12 and TBC 2.4.3 do not send the roles byte.
const bool hasRoles = isActiveExpansion("wotlk");
if (!GroupListParser::parse(packet, partyData, hasRoles)) return;
if (partyData.isEmpty()) {
LOG_INFO("No longer in a group");