From bb408af14d753c58587e2047d1a63bf88d36b3c2 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 11 Dec 2007 18:45:07 +0000 Subject: Fix possible array indexing exception in inventory server --- OpenSim/Grid/InventoryServer/InventoryManager.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 462dd4a..f3a45c6 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs @@ -182,11 +182,10 @@ namespace OpenSim.Grid.InventoryServer byte[] result = new byte[] { }; string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); - if (parms.Length >= 1) + if (parms.Length > 1) { if (string.Compare(parms[1], "library", true) == 0) { - MemoryStream ms = new MemoryStream(); saveInventoryToStream(_inventory, ms); @@ -195,7 +194,7 @@ namespace OpenSim.Grid.InventoryServer } else if (string.Compare(parms[1], "user", true) == 0) { - if (parms.Length >= 2) + if (parms.Length > 2) { result = GetUserInventory(new LLUUID(parms[2])); } @@ -204,6 +203,5 @@ namespace OpenSim.Grid.InventoryServer return result; } } - } } -- cgit v1.1