diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-08-09 13:58:48 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-08-09 13:58:48 +0100 |
commit | 9614a79a3fa1dde3f72c92c7638b590457e84240 (patch) | |
tree | 6520abf232cb83bf7ff81afdc74dd0f80e2ab2b9 | |
parent | 60a4ceafecdf10647d01127bdae8252fc5b84508 (diff) |
Fix ClamAV command send
Broken-by: 64cc4714ab
-rw-r--r-- | src/src/malware.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/src/malware.c b/src/src/malware.c index a6e354bc4..e696f7a49 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)); |