aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/filters/latin1utf16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/latin1utf16.cpp')
-rw-r--r--src/modules/filters/latin1utf16.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/filters/latin1utf16.cpp b/src/modules/filters/latin1utf16.cpp
index 75ee998..7bbcafb 100644
--- a/src/modules/filters/latin1utf16.cpp
+++ b/src/modules/filters/latin1utf16.cpp
@@ -18,7 +18,9 @@ char Latin1UTF16::ProcessText(char *text, int maxlen, const SWKey *key, const SW
unsigned char *from;
unsigned short *to;
int len;
-
+ if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering
+ return -1;
+
len = strlen(text) + 1; // shift string to right of buffer
if (len < maxlen) {
memmove(&text[maxlen - len], text, len);