summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-14 09:41:03 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-14 09:41:03 +0200
commit1afea20bdc11392f31cfc9a2ed1f767a1eebcb99 (patch)
treeb27c030b5840243cc5c4b212bb62e09cc904facc
parentd3c3aae83622485b01144681f1cd3462a67bd171 (diff)
downloadrsyslog-1afea20bdc11392f31cfc9a2ed1f767a1eebcb99.tar.gz
rsyslog-1afea20bdc11392f31cfc9a2ed1f767a1eebcb99.tar.bz2
rsyslog-1afea20bdc11392f31cfc9a2ed1f767a1eebcb99.zip
bugfix: mmanon did not detect all IP addresses in rewrite mode
The problem occured if two IPs were close to each other and the first one was shrunk. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=485 Thanks to micah-at-riseup.net for reporting this bug
-rw-r--r--ChangeLog7
-rw-r--r--plugins/mmanon/mmanon.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 48490176..52bd1dcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,8 +10,13 @@ Version 7.4.5 [v7.4-stable] 2013-09-??
Thanks to Muri Cicanor for initiating the discussion
- now requires libestr 0.1.7 as early versions had a nasty bug in
string comparisons
+- bugfix: mmanon did not detect all IP addresses in rewrite mode
+ The problem occured if two IPs were close to each other and the first one
+ was shrunk.
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=485
+ Thanks to micah-at-riseup.net for reporting this bug
- bugfix: mmanon sometimes used invalid replacement char in simple mode
- dpending on configuration sequence, the replacement character was set
+ depending on configuration sequence, the replacement character was set
to 's' instead of the correct value. Most importantly, it was set to
's' if simple mode was selected and no replacement char set.
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=484
diff --git a/plugins/mmanon/mmanon.c b/plugins/mmanon/mmanon.c
index 233d9320..16a4f34b 100644
--- a/plugins/mmanon/mmanon.c
+++ b/plugins/mmanon/mmanon.c
@@ -338,6 +338,8 @@ anonip(instanceData *pData, uchar *msg, int *pLenMsg, int *idx)
if(i - endpos > 0) {
*pLenMsg = lenMsg - (i - endpos);
memmove(msg+endpos, msg+i, lenMsg - i + 1);
+ /* correct index for next search! */
+ i -= (i - endpos);
}
}