From 11249054b326b67fab5795bd6d16dcc1c234ae76 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 14 Jan 2013 08:30:42 +0100 Subject: tcpflood: properly terminate when sending small files --- tests/tcpflood.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 8fd347f1..4a3199c8 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -429,6 +429,8 @@ int sendMessages(struct instdata *inst) } } genMsg(buf, sizeof(buf), &lenBuf, inst); /* generate the message to send according to params */ + if(lenBuf == 0) + break; /* terminate when no message could be generated */ if(transport == TP_TCP) { if(sockArray[socknum] == -1) { /* connection was dropped, need to re-establish */ -- cgit v1.2.3 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(-) 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 From d435d3426f69af5a90cdac5fa64fd91841b844ea Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 14 Jan 2013 08:40:13 +0100 Subject: doc: mention last patch in ChangeLog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 418a4974..ec769416 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ Version 5.10.2 [V5-STABLE], 201?-??-?? Thanks to Marius Tomaschewski for the bug report and the patch idea. - bugfix: invalid DST handling under Solaris Thanks to Scott Severtson for the patch. +- bugfix: invalid decrement in pm5424 could lead to log truncation + Thanks to Tomas Heinrich for the patch. - bugfix[kind of]: omudpspoof discarded messages >1472 bytes (MTU size) it now truncates these message, but ensures they are sent. Note that 7.2.5+ will switch to fragmented UDP messages instead (up to 64K) -- cgit v1.2.3 From bb74c4485a5fcb938645ca513f7b592aceff1c7f Mon Sep 17 00:00:00 2001 From: Tomas Heinrich Date: Tue, 12 Mar 2013 11:24:09 +0100 Subject: bugfix: divide action queue discard mark by 10 - was out of range --- action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.c b/action.c index ae116ad9..f1e191d0 100644 --- a/action.c +++ b/action.c @@ -146,7 +146,7 @@ static int iActionQueueDeqBatchSize = 16; /* batch size for action queues */ static int iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ static int iActionQLightDlyMrk = -1; /* light delay mark for disk-assisted queues */ static int iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ -static int iActionQDiscardMark = 9800; /* begin to discard messages */ +static int iActionQDiscardMark = 980; /* begin to discard messages */ static int iActionQDiscardSeverity = 8; /* by default, discard nothing to prevent unintentional loss */ static int iActionQueueNumWorkers = 1; /* number of worker threads for the mm queue above */ static uchar *pszActionQFName = NULL; /* prefix for the main message queue file */ @@ -229,7 +229,7 @@ actionResetQueueParams(void) iActionQHighWtrMark = 800; /* high water mark for disk-assisted queues */ iActionQLightDlyMrk = -1; iActionQLowWtrMark = 200; /* low water mark for disk-assisted queues */ - iActionQDiscardMark = 9800; /* begin to discard messages */ + iActionQDiscardMark = 980; /* begin to discard messages */ iActionQDiscardSeverity = 8; /* discard warning and above */ iActionQueueNumWorkers = 1; /* number of worker threads for the mm queue above */ iActionQueMaxFileSize = 1024*1024; -- cgit v1.2.3