* 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
This commit is contained in:
Machiavelli committed 2009-06-24 19:58:01 +02:00
1 parent 13110a35c4
commit 7fd26a5fee
2 files changed
+9 -1

No files matched your search

+4
View File
@@ -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;