From 3c568253dc580127dcc17f28c790ed587a910acd Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 24 Jun 2009 19:46:54 +0200 Subject: [PATCH] * Fix a crash in Player::BuyItemFromVendor caused by player spoofing packets --HG-- branch : trunk --- src/game/Player.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index f5b1701651..4bec1b885a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17639,7 +17639,11 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint { // cheating attempt if(count < 1) count = 1; - + + // cheating attempt + if(slot > MAX_BAG_SIZE) + return false; + if(!isAlive()) return false;