diff options
author | Melanie | 2010-10-23 22:40:56 +0100 |
---|---|---|
committer | Melanie | 2010-10-23 22:40:56 +0100 |
commit | d0c707209abf50902d4fb748138d8a52070ea3ed (patch) | |
tree | 7c53777339d5e7e42f5dc25b4082346030354947 /OpenSim/Region/ScriptEngine/Shared | |
parent | Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff) | |
download | opensim-SC_OLD-d0c707209abf50902d4fb748138d8a52070ea3ed.zip opensim-SC_OLD-d0c707209abf50902d4fb748138d8a52070ea3ed.tar.gz opensim-SC_OLD-d0c707209abf50902d4fb748138d8a52070ea3ed.tar.bz2 opensim-SC_OLD-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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
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; |