Reinstated the check on im.binaryBucket.Length, this time on the local handler for inventory offers.

soprefactor
Diva Canto 2010-06-11 13:14:07 -07:00
parent 556e91d33c
commit 5d099182c3
1 changed files with 4 additions and 3 deletions

View File

@ -154,17 +154,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
private void OnInstantMessage(IClientAPI client, GridInstantMessage im) private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
{ {
m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog);
Scene scene = FindClientScene(client.AgentId); Scene scene = FindClientScene(client.AgentId);
if (scene == null) // Something seriously wrong here. if (scene == null) // Something seriously wrong here.
return; return;
if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) if (im.dialog == (byte) InstantMessageDialog.InventoryOffered)
{ {
//m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0]));
if (im.binaryBucket.Length < 17) // Invalid
return;
UUID receipientID = new UUID(im.toAgentID); UUID receipientID = new UUID(im.toAgentID);
ScenePresence user = scene.GetScenePresence(receipientID); ScenePresence user = scene.GetScenePresence(receipientID);
UUID copyID; UUID copyID;
@ -420,8 +423,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{ {
// Check if this is ours to handle // Check if this is ours to handle
// //
m_log.Info("OnGridInstantMessage");
Scene scene = FindClientScene(new UUID(msg.toAgentID)); Scene scene = FindClientScene(new UUID(msg.toAgentID));
if (scene == null) if (scene == null)