srs_recipient = string_sprintf("%.*s%.*S%.*s@%.*S", /* lowercased */
quoting, "\"",
- ovec[9]-ovec[8], sub[0] + ovec[8], /* substring 4 */
+ (int) (ovec[9]-ovec[8]), sub[0] + ovec[8], /* substr 4 */
quoting, "\"",
- ovec[7]-ovec[6], sub[0] + ovec[6]); /* substring 3 */
+ (int) (ovec[7]-ovec[6]), sub[0] + ovec[6]); /* substr 3 */
/* If a zero-length secret was given, we're done. Otherwise carry on
and validate the given SRS local_part againt our secret. */
{
DEBUG(D_lookup) debug_printf_indent("MYSQL: query was not one that returns data\n");
result = string_cat(result,
- string_sprintf("%d", mysql_affected_rows(mysql_handle)));
+ string_sprintf("%lld", mysql_affected_rows(mysql_handle)));
*do_cache = 0;
goto MYSQL_EXIT;
}
if (sig->created > 0)
{
- uschar minibuf[20];
+ uschar minibuf[21];
snprintf(CS minibuf, sizeof(minibuf), "%lu", sig->created);
hdr = pdkim_headcat(&col, hdr, US";", US"t=", minibuf);
if (sig->expires > 0)
{
- uschar minibuf[20];
+ uschar minibuf[21];
snprintf(CS minibuf, sizeof(minibuf), "%lu", sig->expires);
hdr = pdkim_headcat(&col, hdr, US";", US"x=", minibuf);
if (sig->bodylength >= 0)
{
- uschar minibuf[20];
+ uschar minibuf[21];
snprintf(CS minibuf, sizeof(minibuf), "%lu", sig->bodylength);
hdr = pdkim_headcat(&col, hdr, US";", US"l=", minibuf);
{
const uschar * list = rblock->extra_headers;
int sep = '\n';
- uschar * s;
+ uschar * s, * t;
int slen;
while ((s = string_nextinlist(&list, &sep, NULL, 0)))
- if (!(s = expand_string(s)))
+ if (!(s = expand_string(t = s)))
{
if (!f.expand_string_forcedfail)
{
addr->message = string_sprintf(
"%s router failed to expand add_headers item \"%s\": %s",
- rblock->name, s, expand_string_message);
+ rblock->name, t, expand_string_message);
return DEFER;
}
}
{
const uschar * list = rblock->remove_headers;
int sep = ':';
- uschar * s;
+ uschar * s, * t;
gstring * g = NULL;
if (*remove_headers)
g = string_cat(NULL, *remove_headers);
while ((s = string_nextinlist(&list, &sep, NULL, 0)))
- if (!(s = expand_string(s)))
+ if (!(s = expand_string(t = s)))
{
if (!f.expand_string_forcedfail)
{
addr->message = string_sprintf(
"%s router failed to expand remove_headers item \"%s\": %s",
- rblock->name, s, expand_string_message);
+ rblock->name, t, expand_string_message);
return DEFER;
}
}
if (size >= INT_MAX/2)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "bad memory allocation requested (%lld bytes) at %s %d",
- (unsigned long long)size, func, line);
+ "bad memory allocation requested (" SIZE_T_FMT " bytes) at %s %d",
+ size, func, line);
size += sizeof(size_t); /* space to store the size, used under debug */
if (size < 16) size = 16;
if (!(yield = malloc(size)))
- log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to malloc %d bytes of memory: "
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to malloc " SIZE_T_FMT " bytes of memory: "
"called from line %d in %s", size, line, func);
#ifndef COMPILE_UTILITY
if (f.running_in_test_harness)
memset(yield, 0xF0, size - sizeof(size_t));
-DEBUG(D_memory) debug_printf("--Malloc %6p %5lld bytes\t%-20s %4d\tpool %5d nonpool %5d\n",
+DEBUG(D_memory) debug_printf("--Malloc %6p %5lu bytes\t%-20s %4d\tpool %5d nonpool %5d\n",
yield, size, func, line, pool_malloc, nonpool_malloc);
#endif /* COMPILE_UTILITY */
uschar * p = US block - sizeof(size_t);
#ifndef COMPILE_UTILITY
DEBUG(D_any) nonpool_malloc -= *(size_t *)p;
-DEBUG(D_memory) debug_printf("----Free %6p %5lld bytes\t%-20s %4d\n",
- block, (unsigned long long) *(size_t *)p, func, linenumber);
+DEBUG(D_memory) debug_printf("----Free %6p %5ld bytes\t%-20s %4d\n",
+ block, *(size_t *)p, func, linenumber);
#endif
free(p);
}
}
/* note: our default limit of 2236 is not a multiple of 8; the limit comes from
- * an NSS limit, and the GnuTLS APIs handle bit-sizes fine, so we went with
- * 2236. But older OpenSSL can only report in bytes (octets), not bits.
- * If someone wants to dance at the edge, then they can raise the limit or use
- * current libraries. */
+an NSS limit, and the GnuTLS APIs handle bit-sizes fine, so we went with 2236.
+But older OpenSSL can only report in bytes (octets), not bits. If someone wants
+to dance at the edge, then they can raise the limit or use current libraries. */
+
#ifdef EXIM_HAVE_OPENSSL_DH_BITS
/* Added in commit 26c79d5641d; `git describe --contains` says OpenSSL_1_1_0-pre1~1022
- * This predates OpenSSL_1_1_0 (before a, b, ...) so is in all 1.1.0 */
+This predates OpenSSL_1_1_0 (before a, b, ...) so is in all 1.1.0 */
dh_bitsize = DH_bits(dh);
#else
dh_bitsize = 8 * DH_size(dh);
#endif
-/* Even if it is larger, we silently return success rather than cause things
- * to fail out, so that a too-large DH will not knock out all TLS; it's a
- * debatable choice. */
-if (dh_bitsize > tls_dh_max_bits)
- {
- DEBUG(D_tls)
- debug_printf("dhparams file %d bits, is > tls_dh_max_bits limit of %d\n",
- dh_bitsize, tls_dh_max_bits);
- }
-else
+/* Even if it is larger, we silently return success rather than cause things to
+fail out, so that a too-large DH will not knock out all TLS; it's a debatable
+choice. */
+
+if (dh_bitsize <= tls_dh_max_bits)
{
SSL_CTX_set_tmp_dh(sctx, dh);
DEBUG(D_tls)
debug_printf("Diffie-Hellman initialized from %s with %d-bit prime\n",
dhexpanded ? dhexpanded : US"default", dh_bitsize);
}
+else
+ DEBUG(D_tls)
+ debug_printf("dhparams file %d bits, is > tls_dh_max_bits limit of %d\n",
+ dh_bitsize, tls_dh_max_bits);
DH_free(dh);
BIO_free(bio);
)
goto proxy_err;
- {
+ {
union sockaddr_46 sin;
(void) ip_addr(&sin, host_af, host->address, port);
&sin.v4.sin_port, sizeof(sin.v4.sin_port));
size = 4+sizeof(sin.v4.sin_addr.s_addr)+sizeof(sin.v4.sin_port);
}
- }
+ }
state = US"connect";
HDEBUG(D_transport|D_acl|D_v)