aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-24 19:58:01 +0200
committerMachiavelli <none@none>2009-06-24 19:58:01 +0200
commit7fd26a5fee28cc875aff421ae38df61e259a5fc9 (patch)
tree67a598fec09ae307cc486966c22f24026e9422b8 /src/game/Player.cpp
parent13110a35c469d3a9087e604aaf336237c0573a3a (diff)
* Fix a crash in Player::BuyItemFromVendor caused by player spoofing packets (Backported from TC2)
* Another crash exploit prevention using the same method in Bag::StoreItem, by Visagalis --HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index b24b3da2ace..7e400be4cb0 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17131,6 +17131,10 @@ 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;