summaryrefslogtreecommitdiff
path: root/plugins/mmanon/mmanon.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-03-11 19:04:23 +0100
committerMichael Biebl <biebl@debian.org>2014-03-11 19:04:23 +0100
commit5fccf771f37973a2cea543fbdf1ed94ed9706faf (patch)
tree80b547300bfb6f1c8ffae16a8af9dea03c3fb75d /plugins/mmanon/mmanon.c
parent0c656246c6818b9fd0426411ed1cf926fbbc907d (diff)
downloadrsyslog-5fccf771f37973a2cea543fbdf1ed94ed9706faf.tar.gz
Imported Upstream version 7.4.8upstream/7.4.8
Diffstat (limited to 'plugins/mmanon/mmanon.c')
-rw-r--r--plugins/mmanon/mmanon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mmanon/mmanon.c b/plugins/mmanon/mmanon.c
index a1c99d0..16a4f34 100644
--- a/plugins/mmanon/mmanon.c
+++ b/plugins/mmanon/mmanon.c
@@ -170,7 +170,6 @@ CODESTARTnewActInst
cstr);
free(cstr);
}
- pData->replChar = es_getBufAddr(pvals[i].val.d.estr)[0];
} else if(!strcmp(actpblk.descr[i].name, "replacementchar")) {
pData->replChar = es_getBufAddr(pvals[i].val.d.estr)[0];
} else if(!strcmp(actpblk.descr[i].name, "ipv4.bits")) {
@@ -307,7 +306,7 @@ anonip(instanceData *pData, uchar *msg, int *pLenMsg, int *idx)
++i;
ipstart[3] = i;
octet = getnum(msg, lenMsg, &i);
- if(octet > 255 || !(msg[i] == ' ' || msg[i] == ':')) goto done;
+ if(octet > 255) goto done;
ipv4addr |= octet;
/* OK, we now found an ip address */
@@ -339,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);
}
}