aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-06-10 21:40:27 -0500
committerSubv <s.v.h21@hotmail.com>2012-06-10 21:40:27 -0500
commit41b1416445d917e7cce09853829ef9f1a8e632bf (patch)
treec8aa83563989b39158c33f24873687aec251ad9c /src
parent7d98f2ffc7652e4797839a86063abfff86603de9 (diff)
Core/Warden: Fixed a crash when Warden.ClientCheckFailAction was set to ban in the config, and Warden::Penalty was called in a context where check is NULL
closes #6736
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Warden/Warden.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index 0734e0a0f63..cc1c2ff50c6 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -188,7 +188,11 @@ std::string Warden::Penalty(WardenCheck* check /*= NULL*/)
std::string accountName;
AccountMgr::GetName(_session->GetAccountId(), accountName);
std::stringstream banReason;
- banReason << "Warden Anticheat Violation: " << check->Comment << " (CheckId: " << check->CheckId << ")";
+ banReason << "Warden Anticheat Violation";
+ // Check can be NULL, for example if the client sent a wrong signature in the warden packet (CHECKSUM FAIL)
+ if (check)
+ banReason << ": " << check->Comment << " (CheckId: " << check->CheckId << ")";
+
sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), banReason.str(),"Server");
return "Ban";