Prevent an exception if a string passed into llXorBase64StringsCorrect is not

a base 64 string. Return the empty string in this case.
avinationmerge
Melanie 2010-10-23 22:40:56 +01:00
parent 9a78281f82
commit d0c707209a
1 changed files with 11 additions and 2 deletions

View File

@ -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;