mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-22 20:17:16 +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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -3130,7 +3130,7 @@ void Client::SendBuyerGreeting(uint32 buyer_id)
|
||||
Message(Chat::White, "Welcome!");
|
||||
return;
|
||||
}
|
||||
Message(Chat::White, buyer.front().welcome_message.c_str());
|
||||
Message(Chat::White, "%s", buyer.front().welcome_message.c_str());
|
||||
}
|
||||
|
||||
void Client::SendSellerBrowsing(const std::string &browser)
|
||||
|
||||
Reference in new issue
Block a user