mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Prevent an exception if a string passed into llXorBase64StringsCorrect is not
a base 64 string. Return the empty string in this case.
This commit is contained in:
@@ -10145,8 +10145,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (str2 == String.Empty)
|
||||
return str1;
|
||||
|
||||
byte[] data1 = Convert.FromBase64String(str1);
|
||||
byte[] data2 = Convert.FromBase64String(str2);
|
||||
byte[] data1;
|
||||
byte[] data2;
|
||||
try
|
||||
{
|
||||
data1 = Convert.FromBase64String(str1);
|
||||
data2 = Convert.FromBase64String(str2);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return new LSL_String(String.Empty);
|
||||
}
|
||||
|
||||
byte[] d2 = new Byte[data1.Length];
|
||||
int pos = 0;
|
||||
|
||||
Reference in New Issue
Block a user