summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-04 13:09:01 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-04 13:09:01 +0000
commit87433db66fa8ea0c822290dd017f3f248192e1b2 (patch)
tree9e15e3a35c7ed9a814c1b6a9743ac82eed0efe9e
parent9bdf66fa494b34a8ce05e985c92e86fc3081e728 (diff)
downloadrsyslog-87433db66fa8ea0c822290dd017f3f248192e1b2.tar.gz
rsyslog-87433db66fa8ea0c822290dd017f3f248192e1b2.tar.xz
rsyslog-87433db66fa8ea0c822290dd017f3f248192e1b2.zip
fixed an off-by-one bug that created problems when :ommysql: syntax was
used. Thanks to sur5r for pointing this out.
-rw-r--r--plugins/ommysql/ommysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index bb3441af..02ab68a7 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -233,7 +233,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
if(*p == '>') {
p++; /* eat '>' '*/
} else if(!strncmp((char*) p, ":ommysql:", sizeof(":ommysql:") - 1)) {
- p += sizeof(":ommysql:"); /* eat indicator sequence */
+ p += sizeof(":ommysql:") - 1; /* eat indicator sequence (-1 because of '\0'!) */
} else {
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
}