[FIRE-36262] Fixed crash in inventory_offer_name_callback calling llformat with unescaped % characters

This commit is contained in:
Hecklezz
2026-01-04 05:37:43 +10:00
parent 9ee9484dad
commit 1c7571c389
+3 -4
View File
@@ -1840,10 +1840,10 @@ void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response)
mRespondFunctions[name](notification, response);
}
void inventory_offer_name_callback(const LLAvatarName& av_name, std::string message)
void inventory_offer_name_callback(const LLAvatarName& av_name, const std::string& from_name, const std::string& message)
{
LLSD args;
args["MESSAGE"] = llformat(message.c_str(), av_name.getUserName().c_str());
args["MESSAGE"] = llformat(from_name.c_str(), av_name.getUserName().c_str()) + message;
LLNotificationsUtil::add("SystemMessageTip", args);
}
@@ -1992,8 +1992,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
size_t separator_idx = mFromName.find('|');
if (separator_idx != std::string::npos && LLUUID::parseUUID(mFromName.substr(0, separator_idx), &inv_sender_id) && mFromName.size() > (++separator_idx))
{
log_message = mFromName.substr(separator_idx) + log_message;
LLAvatarNameCache::instance().get(inv_sender_id, boost::bind(&inventory_offer_name_callback, _2, log_message));
LLAvatarNameCache::instance().get(inv_sender_id, boost::bind(&inventory_offer_name_callback, _2, mFromName.substr(separator_idx), log_message));
}
else
{