From 9de685929e4c202d470e07ec28fda41a5efc8eaf Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Jul 2009 16:32:14 +0200 Subject: 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. --- runtime/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/msg.c') 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); } -- cgit v1.2.3