summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-14 15:21:42 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-14 15:21:42 +0100
commit25a33416e9597087e16483859ecbdd6cdac2df64 (patch)
treefe42619afa77f2fa81f212ab0cf45cd66ae1ca4e
parent05eb0a5052c5d679269ef33cfe07bd4394833a63 (diff)
downloadrsyslog-25a33416e9597087e16483859ecbdd6cdac2df64.tar.gz
rsyslog-25a33416e9597087e16483859ecbdd6cdac2df64.tar.bz2
rsyslog-25a33416e9597087e16483859ecbdd6cdac2df64.zip
bugfix: garbled message if field name was used with jsonf property option
The length for the field name was invalidly computed, resulting in either truncated field names or including extra random data. If the random data contained NULs, the rest of the message became unreadable. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=374
-rw-r--r--ChangeLog7
-rw-r--r--template.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cf633a6d..0d948b3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,7 +20,7 @@ Version 7.2.2 [v7-stable] 2012-10-??
This could happen in RainerScript comparisons (like contains); in some
cases an unitialized variable was accessed, which could lead to an
invalid free and in turn to a segfault.
- Closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372
Thanks to Georgi Georgiev for reporting this bug and his great help
in solving it.
- bugfix: no error msg on unreadable $IncludeConfig path
@@ -31,6 +31,11 @@ Version 7.2.2 [v7-stable] 2012-10-??
- bugfix: make rsyslog compile on kfreebsd again
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=380
Thanks to Guillem Jover for the patch.
+- bugfix: garbled message if field name was used with jsonf property option
+ The length for the field name was invalidly computed, resulting in either
+ truncated field names or including extra random data. If the random data
+ contained NULs, the rest of the message became unreadable.
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=374
----------------------------------------------------------------------------
Version 7.2.1 [v7-stable] 2012-10-29
- bugfix: ruleset()-object did only support a single statement
diff --git a/template.c b/template.c
index 9c24f2a9..1b8b2187 100644
--- a/template.c
+++ b/template.c
@@ -1096,7 +1096,7 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl)
}
} else {
pTpe->fieldName = ustrdup(cstrGetSzStrNoNULL(pStrField));
- pTpe->lenFieldName = cstrLen(pStrProp);
+ pTpe->lenFieldName = ustrlen(pTpe->fieldName);
cstrDestruct(&pStrField);
}
if(pTpe->fieldName == NULL)