From 1afea20bdc11392f31cfc9a2ed1f767a1eebcb99 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 14 Oct 2013 09:41:03 +0200 Subject: 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 --- ChangeLog | 7 ++++++- plugins/mmanon/mmanon.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.3