[Bug Fix] Bound the barter welcome message and don't use it as a format string (#5141)

This commit is contained in:
straps-eq authored and GitHub committed 2026-11-17 23:26:00 -08:00
1 parent 38ba1eeed3
commit 202a316f81
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -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;
}