mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 17:07:17 +00:00
[Bug Fix] Bound the barter welcome message and don't use it as a format string (#5141)
This commit is contained in:
1 parent
38ba1eeed3
commit
202a316f81
2 files changed
+6
-1
No files matched your search
@@ -3798,7 +3798,12 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
case Barter_WelcomeMessageUpdate: {
|
||||
if (app->size < sizeof(BuyerWelcomeMessageUpdate_Struct)) {
|
||||
break;
|
||||
}
|
||||
|
||||
auto bwmu = (BuyerWelcomeMessageUpdate_Struct *) app->pBuffer;
|
||||
bwmu->welcome_message[sizeof(bwmu->welcome_message) - 1] = '\0';
|
||||
SetBuyerWelcomeMessage(bwmu->welcome_message);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user