mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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.
This commit is contained in:
@@ -450,7 +450,11 @@ namespace OpenSim.Framework
|
||||
bool lGotSculpt = false;
|
||||
|
||||
int i = 0;
|
||||
byte extraParamCount = data[i++];
|
||||
byte extraParamCount = 0;
|
||||
if (data.Length > 0)
|
||||
{
|
||||
extraParamCount = data[i++];
|
||||
}
|
||||
|
||||
|
||||
for (int k = 0; k < extraParamCount; k++)
|
||||
@@ -625,4 +629,4 @@ namespace OpenSim.Framework
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user