mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
==1810==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffef04baf90,0x7ffef04baf98) and [0x7ffef04baf90, 0x7ffef04baf98) overlap
#0 0x7f163bb9509e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
#1 0x5652caed27b3 in Client::Handle_Connect_OP_ZoneEntry(EQApplicationPacket const*) ../zone/client_packet.cpp:1535
==1918==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffddc8057c0,0x7ffddc8057c8) and [0x7ffddc8057c0, 0x7ffddc8057c8) overlap
#0 0x7fc61ee0e09e (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
#1 0x56023c149698 in WorldServer::HandleMessage(unsigned short, EQ::Net::Packet const&) ../zone/worldserver.cpp:1055
This commit is contained in:
@@ -507,7 +507,7 @@ void Database::FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 char
|
||||
|
||||
char ln[128];
|
||||
memset(ln, 0, 128);
|
||||
strcpy(ln, GetGroupLeadershipInfo(gid, ln));
|
||||
GetGroupLeadershipInfo(gid, ln);
|
||||
uint32 l_charid = GetCharacterID((const char*)ln);
|
||||
uint16 l_id = GetInstanceID(zone, l_charid, version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user