From 25177192788f9568b209f7402c7f46c11ead1956 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 15 Oct 2013 12:48:40 +0200 Subject: mmutf8fix: compile problem & potential misadressing at end of message this is a regression of a recently-done bugfix, which I unfortunately did not test correctly (accidently, compilation for this module was not enabled). Thanks to Risto Vaarandi for alerting me. --- plugins/mmutf8fix/mmutf8fix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mmutf8fix/mmutf8fix.c b/plugins/mmutf8fix/mmutf8fix.c index f49e79fa..e2077950 100644 --- a/plugins/mmutf8fix/mmutf8fix.c +++ b/plugins/mmutf8fix/mmutf8fix.c @@ -256,9 +256,10 @@ doUTF8(instanceData *pData, uchar *msg, int lenMsg) } else { /* invalid (5&6 byte forbidden by RFC3629) */ msg[i] = pData->replChar; } - if(i+bytesleft >= lenMsg) { + if(i+bytesLeft >= lenMsg) { + int dummy = lenMsg; /* invalid, as rest of message cannot contain full char */ - fixInvldMBSeq(pData, msg, lenMsg, strtIdx, lenMsg, seqLen); + fixInvldMBSeq(pData, msg, lenMsg, strtIdx, &dummy, seqLen); i = lenMsg - 1; } } -- cgit v1.2.3