diff options
Diffstat (limited to 'src/modules/filters/utf8utf16.cpp')
-rw-r--r-- | src/modules/filters/utf8utf16.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/filters/utf8utf16.cpp b/src/modules/filters/utf8utf16.cpp index 9aea6fe..33248a9 100644 --- a/src/modules/filters/utf8utf16.cpp +++ b/src/modules/filters/utf8utf16.cpp @@ -23,6 +23,8 @@ char UTF8UTF16::ProcessText(char *text, int maxlen, const SWKey *key, const SWMo unsigned char significantFirstBits, subsequent; unsigned short schar; + 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); |