Core/Misc: Fix crash in ticket creation

Fix a crash happening with malicious CMSG_GMTICKET_CREATE packets.
This commit is contained in:
jackpoz
2014-05-14 22:07:20 +02:00
parent 32386be8e7
commit 9d760098a5

View File

@@ -233,7 +233,7 @@ void GmTicket::SetChatLog(std::list<uint32> time, std::string const& log)
std::stringstream ss(log);
std::stringstream newss;
std::string line;
while (std::getline(ss, line))
while (std::getline(ss, line) && !time.empty())
{
newss << secsToTimeString(time.front()) << ": " << line << "\n";
time.pop_front();