From 5d099182c3ef563c112a22f2cda5c721214964b7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Jun 2010 13:14:07 -0700 Subject: Reinstated the check on im.binaryBucket.Length, this time on the local handler for inventory offers. --- .../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index c333812..2f1e9dd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -154,17 +154,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer private void OnInstantMessage(IClientAPI client, GridInstantMessage im) { m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); + Scene scene = FindClientScene(client.AgentId); if (scene == null) // Something seriously wrong here. return; - if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) { //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); + if (im.binaryBucket.Length < 17) // Invalid + return; + UUID receipientID = new UUID(im.toAgentID); ScenePresence user = scene.GetScenePresence(receipientID); UUID copyID; @@ -420,8 +423,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer { // Check if this is ours to handle // - m_log.Info("OnGridInstantMessage"); - Scene scene = FindClientScene(new UUID(msg.toAgentID)); if (scene == null) -- cgit v1.1