aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJeff Ames2007-12-11 18:45:07 +0000
committerJeff Ames2007-12-11 18:45:07 +0000
commitbb408af14d753c58587e2047d1a63bf88d36b3c2 (patch)
tree7d1d8ec0c46996b66f4974bb6eb5cefbd64a067e /OpenSim
parentCouple of more small changes (diff)
downloadopensim-SC-bb408af14d753c58587e2047d1a63bf88d36b3c2.zip
opensim-SC-bb408af14d753c58587e2047d1a63bf88d36b3c2.tar.gz
opensim-SC-bb408af14d753c58587e2047d1a63bf88d36b3c2.tar.bz2
opensim-SC-bb408af14d753c58587e2047d1a63bf88d36b3c2.tar.xz
Fix possible array indexing exception in inventory server
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Grid/InventoryServer/InventoryManager.cs6
1 files changed, 2 insertions, 4 deletions
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
182 byte[] result = new byte[] { }; 182 byte[] result = new byte[] { };
183 183
184 string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); 184 string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
185 if (parms.Length >= 1) 185 if (parms.Length > 1)
186 { 186 {
187 if (string.Compare(parms[1], "library", true) == 0) 187 if (string.Compare(parms[1], "library", true) == 0)
188 { 188 {
189
190 MemoryStream ms = new MemoryStream(); 189 MemoryStream ms = new MemoryStream();
191 saveInventoryToStream(_inventory, ms); 190 saveInventoryToStream(_inventory, ms);
192 191
@@ -195,7 +194,7 @@ namespace OpenSim.Grid.InventoryServer
195 } 194 }
196 else if (string.Compare(parms[1], "user", true) == 0) 195 else if (string.Compare(parms[1], "user", true) == 0)
197 { 196 {
198 if (parms.Length >= 2) 197 if (parms.Length > 2)
199 { 198 {
200 result = GetUserInventory(new LLUUID(parms[2])); 199 result = GetUserInventory(new LLUUID(parms[2]));
201 } 200 }
@@ -204,6 +203,5 @@ namespace OpenSim.Grid.InventoryServer
204 return result; 203 return result;
205 } 204 }
206 } 205 }
207
208 } 206 }
209} 207}