Gitweb:
https://git.exim.org/exim.git/commitdiff/9614a79a3fa1dde3f72c92c7638b590457e84240
Commit: 9614a79a3fa1dde3f72c92c7638b590457e84240
Parent: 60a4ceafecdf10647d01127bdae8252fc5b84508
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Aug 9 13:58:48 2021 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Mon Aug 9 13:58:48 2021 +0100
Fix ClamAV command send
Broken-by: 64cc4714ab
---
src/src/malware.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/src/malware.c b/src/src/malware.c
index a6e354b..e696f7a 100644
--- a/src/src/malware.c
+++ b/src/src/malware.c
@@ -1559,7 +1559,11 @@ badseek: err = errno;
if (!use_scan_command)
{ cmd_str.data = US"zINSTREAM"; cmd_str.len = 10; }
else
- cmd_str.data = string_sprintf("SCAN %s\n%n", eml_filename, &cmd_str.len);
+ {
+ int n;
+ cmd_str.data = string_sprintf("SCAN %s\n%n", eml_filename, &n);
+ cmd_str.len = n; /* .len is a size_t */
+ }
/* We have some network servers specified */
if (num_servers)
@@ -1816,7 +1820,7 @@ badseek: err = errno;
if (*p) ++p;
/* colon in returned output? */
- if(!(p = Ustrchr(av_buffer,':')))
+ if (!(p = Ustrchr(av_buffer,':')))
return m_panic_defer(scanent, CUS callout_address, string_sprintf(
"ClamAV returned malformed result (missing colon): %s",
av_buffer));