diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-15 12:48:40 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-15 12:48:40 +0200 |
commit | 25177192788f9568b209f7402c7f46c11ead1956 (patch) | |
tree | cb2cca05afffdd675a46799ad7e2679478c58eb3 /plugins/mmutf8fix/mmutf8fix.c | |
parent | 29ca3f2f95ffe02811499b113f50a19eb81e3b29 (diff) | |
download | rsyslog-25177192788f9568b209f7402c7f46c11ead1956.tar.gz rsyslog-25177192788f9568b209f7402c7f46c11ead1956.tar.bz2 rsyslog-25177192788f9568b209f7402c7f46c11ead1956.zip |
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.
Diffstat (limited to 'plugins/mmutf8fix/mmutf8fix.c')
-rw-r--r-- | plugins/mmutf8fix/mmutf8fix.c | 5 |
1 files 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; } } |