summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-08-27 12:10:44 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-08-27 12:10:44 +0200
commit7aa30acc744ae53aab2a0b2e3d1a1b0081d9e393 (patch)
tree069830741cac987442b620a1cdb8ab4b67c84f39
parent1164429974dcd71ef59dededd3fec54162d919dd (diff)
downloadrsyslog-7aa30acc744ae53aab2a0b2e3d1a1b0081d9e393.tar.gz
rsyslog-7aa30acc744ae53aab2a0b2e3d1a1b0081d9e393.tar.xz
rsyslog-7aa30acc744ae53aab2a0b2e3d1a1b0081d9e393.zip
bugfix (backport): omfwd segfault
Note that the orginal (higher version) patch states this happens only when debugging mode is turned on. That statement is wrong: if debug mode is turned off, the message is not being emitted, but the division by zero in the actual parameters still happens.
-rw-r--r--ChangeLog5
-rw-r--r--tools/omfwd.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 74f40fa4..13de9eac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,11 @@ Version 4.4.1 [v4-stable] (rgerhards), 2009-08-??
This resulted in build errors if no Java was present on the build system,
even though none of the selected option actually required Java.
(I forgot to backport a similar fix to newer releases).
+- bugfix (backport): omfwd segfault
+ Note that the orginal (higher version) patch states this happens only
+ when debugging mode is turned on. That statement is wrong: if debug
+ mode is turned off, the message is not being emitted, but the division
+ by zero in the actual parameters still happens.
---------------------------------------------------------------------------
Version 4.4.0 [v4-stable] (rgerhards), 2009-08-21
- bugfix: stderr/stdout were not closed to be able to emit error messages,
diff --git a/tools/omfwd.c b/tools/omfwd.c
index 4d730f4b..97703c79 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -205,8 +205,6 @@ static rsRetVal UDPSend(instanceData *pData, char *msg, size_t len)
unsigned lsent = 0;
int bSendSuccess;
-dbgprintf("rebind logic: interval %d, curr %d, mod %d, if %d\n", pData->iUDPRebindInterval, pData->nXmit,
- (pData->nXmit % pData->iUDPRebindInterval), ((pData->nXmit % pData->iUDPRebindInterval) == 0));
if(pData->iUDPRebindInterval && (pData->nXmit++ % pData->iUDPRebindInterval == 0)) {
dbgprintf("omfwd dropping UDP 'connection' (as configured)\n");
pData->nXmit = 1; /* else we have an addtl wrap at 2^31-1 */