diff options
Diffstat (limited to 'src/modules/filters/utf8latin1.cpp')
-rw-r--r-- | src/modules/filters/utf8latin1.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/filters/utf8latin1.cpp b/src/modules/filters/utf8latin1.cpp index 6cc1acd..07299fe 100644 --- a/src/modules/filters/utf8latin1.cpp +++ b/src/modules/filters/utf8latin1.cpp @@ -22,6 +22,8 @@ char UTF8Latin1::ProcessText(char *text, int maxlen, const SWKey *key, const SWM unsigned long uchar; unsigned char significantFirstBits, subsequent; + 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); |