bugfix: off-by-one(two) bug in legacy syslog parser

This commit is contained in:
Rainer Gerhards 2011-08-10 11:41:03 +02:00
parent 9bea045e60
commit 1ca6cc236d

View File

@ -1289,7 +1289,7 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
* outputs so that only 32 characters max are used by default.
*/
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;
}