git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Logging: fix crash on local_part utf8-conversion fail
[exim.git]
/
src
/
src
/
malware.c
diff --git
a/src/src/malware.c
b/src/src/malware.c
index 1dc89ae1509c680b0f8cadb3676c47bcaefbe5f4..289b6467232fa992411ceba46f34175191b1836a 100644
(file)
--- a/
src/src/malware.c
+++ b/
src/src/malware.c
@@
-277,11
+277,7
@@
int fd = ip_connectedsocket(SOCK_STREAM, hostname, port, port, 5,
/* Under some fault conditions, FreeBSD 12.2 seen to send a (non-TFO) SYN
and, getting no response, wait for a long time. Impose a 5s max. */
if (fd >= 0)
/* Under some fault conditions, FreeBSD 12.2 seen to send a (non-TFO) SYN
and, getting no response, wait for a long time. Impose a 5s max. */
if (fd >= 0)
- {
- struct timeval tv = {.tv_sec = 5};
- fd_set fds;
- FD_ZERO(&fds); FD_SET(fd, &fds); (void) select(fd+1, NULL, &fds, NULL, &tv);
- }
+ (void) poll_one_fd(fd, POLLOUT, 5 * 1000);
#endif
return fd;
}
#endif
return fd;
}
@@
-938,7
+934,7
@@
badseek: err = errno;
drweb_slen = ntohl(drweb_slen);
/* assume tainted, since it is external input */
drweb_slen = ntohl(drweb_slen);
/* assume tainted, since it is external input */
- tmpbuf = store_get(drweb_slen,
TRUE
);
+ tmpbuf = store_get(drweb_slen,
GET_TAINTED
);
/* read report body */
if (!recv_len(malware_daemon_ctx.sock, tmpbuf, drweb_slen, tmo))
/* read report body */
if (!recv_len(malware_daemon_ctx.sock, tmpbuf, drweb_slen, tmo))
@@
-1457,7
+1453,7
@@
badseek: err = errno;
uschar av_buffer[1024];
uschar *hostname = US"";
host_item connhost;
uschar av_buffer[1024];
uschar *hostname = US"";
host_item connhost;
- int clam_fd
, result
;
+ int clam_fd;
unsigned int fsize_uint;
BOOL use_scan_command = FALSE;
clamd_address * cv[MAX_CLAMD_SERVERS];
unsigned int fsize_uint;
BOOL use_scan_command = FALSE;
clamd_address * cv[MAX_CLAMD_SERVERS];
@@
-1475,9
+1471,9
@@
badseek: err = errno;
int subsep = ' ';
/* Local file; so we def want to use_scan_command and don't want to try
int subsep = ' ';
/* Local file; so we def want to use_scan_command and don't want to try
-
*
passing IP/port combinations */
+ passing IP/port combinations */
use_scan_command = TRUE;
use_scan_command = TRUE;
- cd = (clamd_address *) store_get(sizeof(clamd_address),
FALSE
);
+ cd = (clamd_address *) store_get(sizeof(clamd_address),
GET_UNTAINTED
);
/* extract socket-path part */
sublist = scanner_options;
/* extract socket-path part */
sublist = scanner_options;
@@
-1511,7
+1507,7
@@
badseek: err = errno;
continue;
}
continue;
}
- cd = (clamd_address *) store_get(sizeof(clamd_address),
FALSE
);
+ cd = (clamd_address *) store_get(sizeof(clamd_address),
GET_UNTAINTED
);
/* extract host and port part */
sublist = scanner_options;
/* extract host and port part */
sublist = scanner_options;