summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-09 16:32:14 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-09 16:32:14 +0200
commit9de685929e4c202d470e07ec28fda41a5efc8eaf (patch)
treed64599ac8dee82c96cebb641af24d04befd98f63 /runtime
parent92020c6ea15215af1ea361c8fe010b604653b8f7 (diff)
downloadrsyslog-9de685929e4c202d470e07ec28fda41a5efc8eaf.tar.gz
rsyslog-9de685929e4c202d470e07ec28fda41a5efc8eaf.tar.xz
rsyslog-9de685929e4c202d470e07ec28fda41a5efc8eaf.zip
bugfix: message could be truncated after TAG, often when forwarding
This was a result of an internal processing error if maximum field sizes had been specified in the property replacer. Also did some testbench improvements, including omstdout.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 63ed0083..d29da560 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2405,6 +2405,7 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
--iLen;
}
*pBuf = '\0';
+ bufLen -= iLen; /* subtract remaining length if the string was smaller! */
if(*pbMustBeFreed == 1)
free(pRes);
pRes = pBufStart;
@@ -2858,7 +2859,6 @@ char *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
bufLen = strlen(pRes);
*pPropLen = bufLen;
- /*dbgprintf("MsgGetProp(\"%s\"): \"%s\"\n", pName, pRes); only for verbose debug logging */
ENDfunc
return(pRes);
}