aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-06-19 21:00:09 +0000
committerCharles Krinke2008-06-19 21:00:09 +0000
commit786fd3534dc169b3936bf3d8fd7cade41d28db96 (patch)
tree8c17648832c5b51e5163940c0c560ce3956da239 /OpenSim/Framework/PrimitiveBaseShape.cs
parentMantis#1543. Thank you kindly, Jonc for a patch that: (diff)
downloadopensim-SC_OLD-786fd3534dc169b3936bf3d8fd7cade41d28db96.zip
opensim-SC_OLD-786fd3534dc169b3936bf3d8fd7cade41d28db96.tar.gz
opensim-SC_OLD-786fd3534dc169b3936bf3d8fd7cade41d28db96.tar.bz2
opensim-SC_OLD-786fd3534dc169b3936bf3d8fd7cade41d28db96.tar.xz
Mantis#1572. Thank you kindly, Lulurun for a patch that addresses:
In function "ReadInExtraParamsBytes", parameter "data" is used without a boundary check. if data.Length==0, an "out of index" exception will be thrown.
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index aa88717..1f5428b 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -450,7 +450,11 @@ namespace OpenSim.Framework
450 bool lGotSculpt = false; 450 bool lGotSculpt = false;
451 451
452 int i = 0; 452 int i = 0;
453 byte extraParamCount = data[i++]; 453 byte extraParamCount = 0;
454 if (data.Length > 0)
455 {
456 extraParamCount = data[i++];
457 }
454 458
455 459
456 for (int k = 0; k < extraParamCount; k++) 460 for (int k = 0; k < extraParamCount; k++)
@@ -625,4 +629,4 @@ namespace OpenSim.Framework
625 return data; 629 return data;
626 } 630 }
627 } 631 }
628} \ No newline at end of file 632}