From 8433d88b48fba31117caf315ab10469e02e07b44 Mon Sep 17 00:00:00 2001 From: Tomas Heinrich Date: Wed, 9 Jan 2013 19:19:48 +0100 Subject: bugfix: decrement string length --- runtime/datetime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/datetime.c') 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); -- cgit v1.2.3