aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-05-14 22:07:20 +0200
committerjackpoz <giacomopoz@gmail.com>2014-05-14 22:07:20 +0200
commit9d760098a5a1bf5203fce8e3ba7b462a7885ee75 (patch)
tree7f4326554d0bb21477df9a96878a801394ad5990
parent32386be8e7ff2ab0633069780d2d97b5a186e156 (diff)
Core/Misc: Fix crash in ticket creation
Fix a crash happening with malicious CMSG_GMTICKET_CREATE packets.
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index b9ecfffb8c3..71d51153b4c 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -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();