X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/4a852e8c97fa4de42c443107121c7717e1f0c9b2..a375c22c1df005c1bd710af1e540fba6e9a496d1:/src/src/exim.c diff --git a/src/src/exim.c b/src/src/exim.c index ff1aa49db..1ed09d38d 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -122,7 +122,7 @@ if (!(yield = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, options, uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); log_write(0, LOG_MAIN|LOG_PANIC_DIE, "regular expression error: " - "%s at offset %d while compiling %s", errbuf, (long)offset, pattern); + "%s at offset %ld while compiling %s", errbuf, (long)offset, pattern); } if (use_malloc) @@ -150,12 +150,8 @@ pcre_mtc_ctx = pcre2_match_context_create(pcre_gen_ctx); *************************************************/ /* This function runs a regular expression match, and sets up the pointers to -the matched substrings. The matched strings are copied. - -We might consider tracing the uses of expand_nstring to see if consitification -is viable, and save the copy cost by just using the pointers into the subject string. -Pre-pcre2 we did that without noticing, so it might just work - or might have been -a bug. It was certainly a risk in the implemenation. +the matched substrings. The matched strings are copied so the lifetime of +the subject is not a problem. Arguments: re the compiled expression @@ -1060,7 +1056,7 @@ g = string_cat(NULL, US"Support for:"); g = string_cat(g, US" OCSP"); #endif #ifndef DISABLE_PIPE_CONNECT - g = string_cat(g, US" PIPE_CONNECT"); + g = string_cat(g, US" PIPECONNECT"); #endif #ifndef DISABLE_PRDR g = string_cat(g, US" PRDR"); @@ -5437,7 +5433,7 @@ if (smtp_input) { if (!f.is_inetd) set_process_info("accepting a local %sSMTP message from <%s>", smtp_batched_input? "batched " : "", - (sender_address!= NULL)? sender_address : originator_login); + sender_address ? sender_address : originator_login); } else { @@ -5487,7 +5483,8 @@ if (smtp_input) } } -/* Otherwise, set up the input size limit here. */ +/* Otherwise, set up the input size limit here and set no stdin stdio buffer +(we handle buferring so as to have visibility of fill level). */ else { @@ -5499,6 +5496,8 @@ else else log_write(0, LOG_MAIN|LOG_PANIC_DIE, "invalid value for " "message_size_limit: %s", expand_string_message); + + setvbuf(stdin, NULL, _IONBF, 0); } /* Loop for several messages when reading SMTP input. If we fork any child