git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
60a4cea
)
Fix ClamAV command send
author
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 9 Aug 2021 12:58:48 +0000
(13:58 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 9 Aug 2021 12:58:48 +0000
(13:58 +0100)
Broken-by: 64cc4714ab
src/src/malware.c
patch
|
blob
|
history
diff --git
a/src/src/malware.c
b/src/src/malware.c
index a6e354bc4d030e3d18957d5fcc028547a3861240..e696f7a497d8c54473c464c12766d7f9ac3a3ca0 100644
(file)
--- 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
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)
/* 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) ++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));
return m_panic_defer(scanent, CUS callout_address, string_sprintf(
"ClamAV returned malformed result (missing colon): %s",
av_buffer));