[syslog-ng] [Bug 90] csv-parser's flags(drop-invalid) doesn' t work with escape-{backslash, double-char}
bugzilla at bugzilla.balabit.com
bugzilla at bugzilla.balabit.com
Tue Jun 29 20:08:38 CEST 2010
https://bugzilla.balabit.com/show_bug.cgi?id=90
--- Comment #2 from andrewn at locus.net 2010-06-29 20:08:38 ---
Created an attachment (id=20)
--> (https://bugzilla.balabit.com/attachment.cgi?id=20)
Shell script that demonstrates Bug #90
This shell script demonstrates bug #90. It creates a temporary config file, executes the specified syslog-ng binary, and sends a single log entry. It assumes
that /tmp is writable, ./syslog-ng-3.0.7-unpatched is the syslog-ng binary, and /bin/logger exists from util-linux.
On syslog-ng 3.0.7 the parser in the first test works (flags(escape-none,drop-invalid)) while the in the second test it falls through
(flags(escape-backslash,drop-invalid)). I would expect both sets of flags to behave identically on input which doesn't contain backslashes.
The current code returns FALSE if (!cur_column && (self->flags & LOG_CSV_PARSER_DROP_INVALID)). Since cur_column is set to the next element after assigning a
match cur_column should be NULL if all columns have been assigned. This is the case for escape-backslash and escape-double-char, but at line 251 escape-none
breaks before setting cur_column if it hits the end of the string.
The test should be (cur_column && (self->flags & LOG_CSV_PARSER_DROP_INVALID)). I added in the *src test because it makes sense based on the name of the flag.
Based on the documentation you quoted it would have to be a separate flag.
--
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the syslog-ng
mailing list