diff options
author | Tomas Heinrich <theinric@redhat.com> | 2013-01-09 19:19:48 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-14 08:38:46 +0100 |
commit | 8433d88b48fba31117caf315ab10469e02e07b44 (patch) | |
tree | ae2ce0e2c4edc5005d979ba26e6af582a7c6a875 | |
parent | 11249054b326b67fab5795bd6d16dcc1c234ae76 (diff) | |
download | rsyslog-8433d88b48fba31117caf315ab10469e02e07b44.tar.gz rsyslog-8433d88b48fba31117caf315ab10469e02e07b44.tar.bz2 rsyslog-8433d88b48fba31117caf315ab10469e02e07b44.zip |
bugfix: decrement string length
-rw-r--r-- | runtime/datetime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c index 43346945..3dfa11e0 100644 --- a/runtime/datetime.c +++ b/runtime/datetime.c @@ -304,8 +304,10 @@ ParseTIMESTAMP3339(struct syslogTime *pTime, uchar** ppszTS, int *pLenStr) if(OffsetHour < 0 || OffsetHour > 23) ABORT_FINALIZE(RS_RET_INVLD_TIME); - if(lenStr == 0 || *pszTS++ != ':') + if(lenStr == 0 || *pszTS != ':') ABORT_FINALIZE(RS_RET_INVLD_TIME); + --lenStr; + pszTS++; OffsetMinute = srSLMGParseInt32(&pszTS, &lenStr); if(OffsetMinute < 0 || OffsetMinute > 59) ABORT_FINALIZE(RS_RET_INVLD_TIME); |