git://git.exim.org
/
users
/
heiko
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf58e48
)
Tweak Avast scanner interface
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 20 Dec 2014 18:24:25 +0000
(18:24 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 20 Dec 2014 18:24:25 +0000
(18:24 +0000)
src/src/malware.c
patch
|
blob
|
history
diff --git
a/src/src/malware.c
b/src/src/malware.c
index 9099c8a5b9e0ca9cafe303a1526b15b71101e06b..167f47f2c05b79e4c057c652632e22e965a78ae1 100644
(file)
--- a/
src/src/malware.c
+++ b/
src/src/malware.c
@@
-1574,6
+1574,8
@@
malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
goto endloop; /* require a 200 */
sendreq:
goto endloop; /* require a 200 */
sendreq:
+ {
+ int len;
/* Check for another option to send. Newline-terminate it. */
if ((scanrequest = string_nextinlist(&av_scanner_work, &sep,
NULL, 0)))
/* Check for another option to send. Newline-terminate it. */
if ((scanrequest = string_nextinlist(&av_scanner_work, &sep,
NULL, 0)))
@@
-1583,18
+1585,22
@@
malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
}
else
{
}
else
{
- scanrequest = string_sprintf("SCAN %s/scan/%s\
r\
n",
+ scanrequest = string_sprintf("SCAN %s/scan/%s\n",
spool_directory, message_id);
avast_stage = AVA_RSP; /* just sent command */
}
/* send config-cmd or scan-request to socket */
spool_directory, message_id);
avast_stage = AVA_RSP; /* just sent command */
}
/* send config-cmd or scan-request to socket */
- if (send(sock, scanrequest, Ustrlen(scanrequest), 0) < 0)
+ len = Ustrlen(scanrequest);
+ if (send(sock, scanrequest, len, 0) < 0)
+ {
+ scanrequest[len-1] = '\0';
return m_errlog_defer_3(scanent, string_sprintf(
return m_errlog_defer_3(scanent, string_sprintf(
- "unable to send
scan request
to socket (%s): %s",
- scan
ner_options, strerror(errno)),
- sock);
+ "unable to send
request '%s'
to socket (%s): %s",
+ scan
request, scanner_options, strerror(errno)), sock);
+ }
break;
break;
+ }
case AVA_RSP:
if (Ustrncmp(buf, "210", 3) == 0)
case AVA_RSP:
if (Ustrncmp(buf, "210", 3) == 0)