All pastes #475714 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-07 17:13 UTC
rendered paste body
Index: /GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java
===================================================================
--- /GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java (revision 1)
+++ /GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java (revision 354)
@@ -19,9 +19,7 @@
 package net.sf.l2j.gameserver.clientpackets;
 
-import java.nio.ByteBuffer;
 import java.util.logging.Logger;
 
 import net.sf.l2j.Config;
-import net.sf.l2j.gameserver.ClientThread;
 import net.sf.l2j.gameserver.model.ClanWarehouse;
 import net.sf.l2j.gameserver.model.ItemContainer;
@@ -44,5 +42,5 @@
  * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/03/29 23:15:16 $
  */
-public class SendWareHouseWithDrawList extends ClientBasePacket
+public final class SendWareHouseWithDrawList extends L2GameClientPacket
 {
 	private static final String _C__32_SENDWAREHOUSEWITHDRAWLIST = "[C] 32 SendWareHouseWithDrawList";
@@ -52,9 +50,8 @@
 	private int[] _items;
 	
-	public SendWareHouseWithDrawList(ByteBuffer buf, ClientThread client)
+	protected void readImpl()
 	{
-		super(buf, client);
 		_count = readD();
-		if (_count < 0)
+		if (_count < 0  || _count * 8 > _buf.remaining() || _count > Config.MAX_ITEM_IN_PACKET)
 		{
 		    _count = 0; 
@@ -77,5 +74,5 @@
 	}
 
-	void runImpl()
+	protected void runImpl()
 	{
 		L2PcInstance player = getClient().getActiveChar();