aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ChildAgentDataUpdate.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-08-08 01:32:16 +0100
committerUbitUmarov2014-08-08 01:32:16 +0100
commitc6cdd597f3ac0165d73a152b23a3abbbceb9a96e (patch)
treec772724a9a08d548c747bceeff16fbdd157d426a /OpenSim/Framework/ChildAgentDataUpdate.cs
parentFix coalesced objects not showing up as "piles" of prims (AVN only bug) (diff)
downloadopensim-SC-c6cdd597f3ac0165d73a152b23a3abbbceb9a96e.zip
opensim-SC-c6cdd597f3ac0165d73a152b23a3abbbceb9a96e.tar.gz
opensim-SC-c6cdd597f3ac0165d73a152b23a3abbbceb9a96e.tar.bz2
opensim-SC-c6cdd597f3ac0165d73a152b23a3abbbceb9a96e.tar.xz
add wearables array size checks on unpack
Diffstat (limited to 'OpenSim/Framework/ChildAgentDataUpdate.cs')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 8c32734..967278e 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -657,7 +657,12 @@ namespace OpenSim.Framework
657 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array) 657 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
658 { 658 {
659 OSDArray wears = (OSDArray)(args["wearables"]); 659 OSDArray wears = (OSDArray)(args["wearables"]);
660 for (int i = 0; i < wears.Count / 2; i++) 660
661 int count = wears.Count;
662 if (count > AvatarWearable.MAX_WEARABLES)
663 count = AvatarWearable.MAX_WEARABLES;
664
665 for (int i = 0; i < count / 2; i++)
661 { 666 {
662 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]); 667 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
663 Appearance.SetWearable(i,awear); 668 Appearance.SetWearable(i,awear);