aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-10-23 22:40:56 +0100
committerMelanie2010-10-23 22:40:56 +0100
commitd0c707209abf50902d4fb748138d8a52070ea3ed (patch)
tree7c53777339d5e7e42f5dc25b4082346030354947
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
downloadopensim-SC-d0c707209abf50902d4fb748138d8a52070ea3ed.zip
opensim-SC-d0c707209abf50902d4fb748138d8a52070ea3ed.tar.gz
opensim-SC-d0c707209abf50902d4fb748138d8a52070ea3ed.tar.bz2
opensim-SC-d0c707209abf50902d4fb748138d8a52070ea3ed.tar.xz
Prevent an exception if a string passed into llXorBase64StringsCorrect is not
a base 64 string. Return the empty string in this case.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 3249ae2..36ca542 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10145,8 +10145,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10145 if (str2 == String.Empty) 10145 if (str2 == String.Empty)
10146 return str1; 10146 return str1;
10147 10147
10148 byte[] data1 = Convert.FromBase64String(str1); 10148 byte[] data1;
10149 byte[] data2 = Convert.FromBase64String(str2); 10149 byte[] data2;
10150 try
10151 {
10152 data1 = Convert.FromBase64String(str1);
10153 data2 = Convert.FromBase64String(str2);
10154 }
10155 catch (Exception)
10156 {
10157 return new LSL_String(String.Empty);
10158 }
10150 10159
10151 byte[] d2 = new Byte[data1.Length]; 10160 byte[] d2 = new Byte[data1.Length];
10152 int pos = 0; 10161 int pos = 0;