diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-31 12:18:27 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-31 12:18:27 +0200 |
commit | 672f45733bbcfab03e1284afc41b4b516f4f5365 (patch) | |
tree | d39dbfb1c2945209d04b75b270d9dad0ec128d6f /runtime/msg.c | |
parent | f9dc2f787630ec9729b02ef73dd8dc5614160f13 (diff) | |
parent | 0426ad7dd27fda6854f7d306e46331387b20947a (diff) | |
download | rsyslog-672f45733bbcfab03e1284afc41b4b516f4f5365.tar.gz rsyslog-672f45733bbcfab03e1284afc41b4b516f4f5365.tar.bz2 rsyslog-672f45733bbcfab03e1284afc41b4b516f4f5365.zip |
Merge branch 'master' into v7-devel
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 938c4f74..3f6916cb 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2584,9 +2584,9 @@ jsonField(struct templateEntry *pTpe, uchar **ppRes, unsigned short *pbMustBeFre pSrc = *ppRes; buflen = (*pBufLen == -1) ? ustrlen(pSrc) : *pBufLen; /* we hope we have only few escapes... */ - dst = es_newStr(buflen+es_strlen(pTpe->fieldName)+15); + dst = es_newStr(buflen+pTpe->lenFieldName+15); es_addChar(&dst, '"'); - es_addStr(&dst, pTpe->fieldName); + es_addBuf(&dst, (char*)pTpe->fieldName, pTpe->lenFieldName); es_addBufConstcstr(&dst, "\":\""); CHKiRet(jsonAddVal(pSrc, buflen, &dst)); es_addChar(&dst, '"'); |