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 (parent:
806c3df
)
tidying: coverity issues
author
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 4 Mar 2016 11:58:27 +0000
(11:58 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 4 Mar 2016 11:58:27 +0000
(11:58 +0000)
src/src/header.c
patch
|
blob
|
history
src/src/malware.c
patch
|
blob
|
history
src/src/pdkim/pdkim.c
patch
|
blob
|
history
src/src/regex.c
patch
|
blob
|
history
src/src/routers/redirect.c
patch
|
blob
|
history
src/src/smtp_in.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
src/src/transports/lmtp.c
patch
|
blob
|
history
diff --git
a/src/src/header.c
b/src/src/header.c
index 8136c69fe507b7c2e1a98c4cd973175e6a368a81..e6f41b8b9b16e66787b591fa384f75584ec4a381 100644
(file)
--- a/
src/src/header.c
+++ b/
src/src/header.c
@@
-450,10
+450,11
@@
for (s = strings; s != NULL; s = s->next)
va_start(ap, count);
for (i = 0; i < count; i++)
va_start(ap, count);
for (i = 0; i < count; i++)
- {
if (one_pattern_match(name, slen, has_addresses, va_arg(ap, uschar *)))
if (one_pattern_match(name, slen, has_addresses, va_arg(ap, uschar *)))
+ {
+ va_end(ap);
return cond;
return cond;
- }
+
}
va_end(ap);
return !cond;
va_end(ap);
return !cond;
diff --git
a/src/src/malware.c
b/src/src/malware.c
index 9dd241b8c84f0d62cf9c9aff7be8992ec3dbb10e..9451392f241695866ebc2d6e80dc6b14e7a81caa 100644
(file)
--- a/
src/src/malware.c
+++ b/
src/src/malware.c
@@
-657,7
+657,6
@@
if (!malware_ok)
"unable to send file body to socket (%s)", scanner_options),
sock);
}
"unable to send file body to socket (%s)", scanner_options),
sock);
}
- (void)close(drweb_fd);
}
else
{
}
else
{
@@
-1304,11
+1303,8
@@
if (!malware_ok)
/* parse options */
/*XXX should these options be common over scanner types? */
if (clamd_option(cd, sublist, &subsep) != OK)
/* parse options */
/*XXX should these options be common over scanner types? */
if (clamd_option(cd, sublist, &subsep) != OK)
- {
return m_errlog_defer(scanent, NULL,
string_sprintf("bad option '%s'", scanner_options));
return m_errlog_defer(scanent, NULL,
string_sprintf("bad option '%s'", scanner_options));
- continue;
- }
cv[num_servers++] = cd;
if (num_servers >= MAX_CLAMD_SERVERS)
cv[num_servers++] = cd;
if (num_servers >= MAX_CLAMD_SERVERS)
diff --git
a/src/src/pdkim/pdkim.c
b/src/src/pdkim/pdkim.c
index 69db3101f380db8f9e71fd1efd9bdec689e593ce..3aac759ebe22b5bb6a65c3a083b6231b1e39f5fc 100644
(file)
--- a/
src/src/pdkim/pdkim.c
+++ b/
src/src/pdkim/pdkim.c
@@
-831,9
+831,6
@@
for (p = raw_record; ; p++)
if (!cur_val)
cur_val = pdkim_strnew(NULL);
if (!cur_val)
cur_val = pdkim_strnew(NULL);
- if (c == '\r' || c == '\n')
- goto NEXT_CHAR;
-
if (c == ';' || c == '\0')
{
if (cur_tag->len > 0)
if (c == ';' || c == '\0')
{
if (cur_tag->len > 0)
@@
-1755,6
+1752,13
@@
while (sig)
if (!(sig->signature_header = pdkim_create_header(sig, TRUE)))
return PDKIM_ERR_OOM;
if (!(sig->signature_header = pdkim_create_header(sig, TRUE)))
return PDKIM_ERR_OOM;
+
+ /* We only ever sign with one sig, and we free'd "headernames"
+ above. So to keep static-analysers happy, exit the loop explicitly.
+ Perhaps the code would be more clear if signing and verification
+ loops were separated? */
+
+ break;
}
/* VERIFICATION ----------------------------------------------------------- */
}
/* VERIFICATION ----------------------------------------------------------- */
diff --git
a/src/src/regex.c
b/src/src/regex.c
index 3852ad8c52a68427651bd4b9708cb54b03aab6ff..b3ef31c3eac812982c84dcf8f02f847bb64b96d0 100644
(file)
--- a/
src/src/regex.c
+++ b/
src/src/regex.c
@@
-112,7
+112,12
@@
if (!mime_stream) /* We are in the DATA ACL */
}
else
{
}
else
{
- f_pos = ftell(mime_stream);
+ if ((f_pos = ftell(mime_stream)) < 0)
+ {
+ log_write(0, LOG_MAIN|LOG_PANIC,
+ "regex acl condition: mime_stream: %s", strerror(errno));
+ return DEFER;
+ }
mbox_file = mime_stream;
}
mbox_file = mime_stream;
}
diff --git
a/src/src/routers/redirect.c
b/src/src/routers/redirect.c
index 7bbaa82e400c8ede467eb8f63cf97810f4061fb3..2efb42160d3318755b35a79ae1f390a228aede14 100644
(file)
--- a/
src/src/routers/redirect.c
+++ b/
src/src/routers/redirect.c
@@
-553,6
+553,12
@@
addr_prop.remove_headers = NULL;
#ifdef EXPERIMENTAL_SRS
addr_prop.srs_sender = NULL;
#endif
#ifdef EXPERIMENTAL_SRS
addr_prop.srs_sender = NULL;
#endif
+#ifdef SUPPORT_I18N
+addr_prop.utf8_msg = FALSE; /*XXX should we not copy this from the parent? */
+addr_prop.utf8_downcvt = FALSE;
+addr_prop.utf8_downcvt_maybe = FALSE;
+#endif
+
/* When verifying and testing addresses, the "logwrite" command in filters
must be bypassed. */
/* When verifying and testing addresses, the "logwrite" command in filters
must be bypassed. */
diff --git
a/src/src/smtp_in.c
b/src/src/smtp_in.c
index 0498ecb18d8399c643f1b70e043ebb403f5dd1ff..202fcf1bb326376a482894a94852d757b3fbfbbd 100644
(file)
--- a/
src/src/smtp_in.c
+++ b/
src/src/smtp_in.c
@@
-3323,9
+3323,9
@@
while (done <= 0)
smtp_cmd_data = NULL;
if (smtp_in_auth(au, &s, &ss) == OK)
smtp_cmd_data = NULL;
if (smtp_in_auth(au, &s, &ss) == OK)
- DEBUG(D_auth) debug_printf("tls auth succeeded\n");
+ { DEBUG(D_auth) debug_printf("tls auth succeeded\n"); }
else
else
- DEBUG(D_auth) debug_printf("tls auth not succeeded\n");
+ { DEBUG(D_auth) debug_printf("tls auth not succeeded\n"); }
break;
}
}
break;
}
}
diff --git
a/src/src/string.c
b/src/src/string.c
index e0e0fa5ae536db9a0294e8373ecf77c643e69f81..b559a9f193413637106f12170ed0c9f79ae6f415 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-1518,6
+1518,7
@@
specified messages. If it does, the message just gets truncated, and there
doesn't seem much we can do about that. */
(void)string_vformat(buffer+15, sizeof(buffer) - 15, format, ap);
doesn't seem much we can do about that. */
(void)string_vformat(buffer+15, sizeof(buffer) - 15, format, ap);
+va_end(ap);
return (eno == EACCES)?
string_sprintf("%s: %s (euid=%ld egid=%ld)", buffer, strerror(eno),
return (eno == EACCES)?
string_sprintf("%s: %s (euid=%ld egid=%ld)", buffer, strerror(eno),
diff --git
a/src/src/transports/lmtp.c
b/src/src/transports/lmtp.c
index 1f4d7a6bf56ee9ec210436f05e5cfa47a23f87db..7c091cb5926d1bbce081277763cf922ea6fe6722 100644
(file)
--- a/
src/src/transports/lmtp.c
+++ b/
src/src/transports/lmtp.c
@@
-217,6
+217,7
@@
va_list ap;
va_start(ap, format);
if (!string_vformat(big_buffer, big_buffer_size, CS format, ap))
{
va_start(ap, format);
if (!string_vformat(big_buffer, big_buffer_size, CS format, ap))
{
+ va_end(ap);
errno = ERRNO_SMTPFORMAT;
return FALSE;
}
errno = ERRNO_SMTPFORMAT;
return FALSE;
}