mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 23:51:28 +00:00
Merge pull request #1280 from EQEmu/bug_fix/strcpy_overlap_GetGroupLeadershipInfo
[ASan] Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
This commit is contained in:
commit
e5f5db69b4
@ -507,7 +507,7 @@ void Database::FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 char
|
|||||||
|
|
||||||
char ln[128];
|
char ln[128];
|
||||||
memset(ln, 0, 128);
|
memset(ln, 0, 128);
|
||||||
strcpy(ln, GetGroupLeadershipInfo(gid, ln));
|
GetGroupLeadershipInfo(gid, ln);
|
||||||
uint32 l_charid = GetCharacterID((const char*)ln);
|
uint32 l_charid = GetCharacterID((const char*)ln);
|
||||||
uint16 l_id = GetInstanceID(zone, l_charid, version);
|
uint16 l_id = GetInstanceID(zone, l_charid, version);
|
||||||
|
|
||||||
|
|||||||
@ -1532,7 +1532,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
int mentor_percent;
|
int mentor_percent;
|
||||||
GroupLeadershipAA_Struct GLAA;
|
GroupLeadershipAA_Struct GLAA;
|
||||||
memset(ln, 0, 64);
|
memset(ln, 0, 64);
|
||||||
strcpy(ln, database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA));
|
database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA);
|
||||||
Client *c = entity_list.GetClientByName(ln);
|
Client *c = entity_list.GetClientByName(ln);
|
||||||
if (c)
|
if (c)
|
||||||
group->SetLeader(c);
|
group->SetLeader(c);
|
||||||
|
|||||||
@ -1048,7 +1048,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
int mentor_percent;
|
int mentor_percent;
|
||||||
GroupLeadershipAA_Struct GLAA;
|
GroupLeadershipAA_Struct GLAA;
|
||||||
memset(ln, 0, 64);
|
memset(ln, 0, 64);
|
||||||
strcpy(ln, database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA));
|
database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA);
|
||||||
Client *lc = entity_list.GetClientByName(ln);
|
Client *lc = entity_list.GetClientByName(ln);
|
||||||
if (lc)
|
if (lc)
|
||||||
group->SetLeader(lc);
|
group->SetLeader(lc);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user