summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Kistner <tom@duncanthrax.net>2005-08-02 18:24:14 +0000
committerTom Kistner <tom@duncanthrax.net>2005-08-02 18:24:14 +0000
commit3c5cd61621efb58a8f03d5d1c048ee2a3c941f71 (patch)
treea9e3325a68234270045579bb3325fe71685ed5d8
parentee744174c5e0c3fb63ee48c65ecd18ed99446cc4 (diff)
Fix log output including CR from clamd
-rw-r--r--src/src/malware.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/src/malware.c b/src/src/malware.c
index ca9c3dfeb..bdf3348d5 100644
--- a/src/src/malware.c
+++ b/src/src/malware.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/malware.c,v 1.12 2005/08/01 14:41:25 ph10 Exp $ */
+/* $Cambridge: exim/src/src/malware.c,v 1.13 2005/08/02 18:24:14 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1265,6 +1265,10 @@ int malware(uschar **listptr) {
return DEFER;
}
+ /* strip newline at the end */
+ p = av_buffer + Ustrlen(av_buffer) - 1;
+ if( *p == '\n' ) *p = '\0';
+
/* colon in returned output? */
if((p = Ustrrchr(av_buffer,':')) == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
@@ -1273,13 +1277,10 @@ int malware(uschar **listptr) {
return DEFER;
}
- /* strip filename strip CR at the end */
+ /* strip filename */
++p;
while (*p == ' ') ++p;
vname = p;
- p = vname + Ustrlen(vname) - 1;
- if( *p == '\n' ) *p = '\0';
-
if ((p = Ustrstr(vname, "FOUND"))!=NULL) {
*p=0;
for (--p;p>vname && *p<=32;p--) *p=0;