aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-24 19:46:54 +0200
committerMachiavelli <none@none>2009-06-24 19:46:54 +0200
commit3c568253dc580127dcc17f28c790ed587a910acd (patch)
tree0f76a6701ae1bfd670a3d261f1eca86a1e3042a4 /src
parent5090a5967a4b50723001bfeb2490235347127e73 (diff)
* Fix a crash in Player::BuyItemFromVendor caused by player spoofing packets
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f5b17016512..4bec1b885a7 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;