summaryrefslogtreecommitdiffstats
path: root/tools/pmrfc3164.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-08-30 15:35:02 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-08-30 15:35:02 +0200
commit645a8541d5bbd7cfc0dd9e9f434cce280acf7af8 (patch)
treeb388099c17ffba05be37e8cc679aec315fc64cbb /tools/pmrfc3164.c
parent154747929f87010b444af2d552f980daafe451e6 (diff)
parentd654e51e2c54e6042a73ee6c95062c916161cdbe (diff)
downloadrsyslog-645a8541d5bbd7cfc0dd9e9f434cce280acf7af8.tar.gz
rsyslog-645a8541d5bbd7cfc0dd9e9f434cce280acf7af8.tar.xz
rsyslog-645a8541d5bbd7cfc0dd9e9f434cce280acf7af8.zip
Merge branch 'v4-stable' into v5-stable
Conflicts: ChangeLog tools/syslogd.c
Diffstat (limited to 'tools/pmrfc3164.c')
-rw-r--r--tools/pmrfc3164.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c
index d56e53f0..6d2d22b1 100644
--- a/tools/pmrfc3164.c
+++ b/tools/pmrfc3164.c
@@ -176,9 +176,8 @@ CODESTARTparse
* in RFC3164...). We now receive the full size, but will modify the
* outputs so that only 32 characters max are used by default.
*/
-dbgprintf("pmrfc3164:tag:in: lenMsg %d, p2parse: '%s'\n", lenMsg, p2parse);
i = 0;
- while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE) {
+ while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE - 2) {
bufParseTAG[i++] = *p2parse++;
--lenMsg;
}
@@ -192,7 +191,6 @@ dbgprintf("pmrfc3164:tag:in: lenMsg %d, p2parse: '%s'\n", lenMsg, p2parse);
* is considered OK. So we do not need to check for empty TAG. -- rgerhards, 2009-06-23
*/
bufParseTAG[i] = '\0'; /* terminate string */
-dbgprintf("pmrfc3164:tag:done: lenMsg %d, i %d, bufParseTAG: '%s'\n", lenMsg, i, bufParseTAG);
MsgSetTAG(pMsg, bufParseTAG, i);
} else {/* we enter this code area when the user has instructed rsyslog NOT
* to parse HOSTNAME and TAG - rgerhards, 2006-03-13