X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/9f6b3bf5187562bac4c96e3ed6a17740d01489fa..c1d124daf6ccb5b2ec59cf7fa6c1d76002ab0a42:/src/exim_monitor/em_log.c diff --git a/src/exim_monitor/em_log.c b/src/exim_monitor/em_log.c index 8d85c13f1..49f649d7e 100644 --- a/src/exim_monitor/em_log.c +++ b/src/exim_monitor/em_log.c @@ -5,6 +5,7 @@ /* Copyright (c) University of Cambridge 1995 - 2018 */ /* Copyright (c) The Exim Maintainters 2021 - 2022 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* This module contains code for scanning the main log, extracting information from it, and displaying a "tail". */ @@ -107,7 +108,9 @@ length = Ustrlen(buffer); #ifdef ANONYMIZE { uschar *p = buffer + 9; - if (p[6] == '-' && p[13] == '-') p += 17; + if ( p[MESSAGE_ID_TIME_LEN] == '-' + && p[MESSAGE_ID_TIME_LEN + MESSAGE_ID_PID_LEN + 1] == '-') + p += MESSAGE_ID_LENGTH + 1; while (p < buffer + length) { @@ -291,7 +294,7 @@ if (LOG != NULL) if ((p = Ustrstr(buffer, "==")) != NULL) { - queue_item *qq = find_queue(id, queue_noop, 0); + queue_item * qq = find_queue(id, queue_noop, 0); if (qq) { dest_item *d; @@ -299,14 +302,12 @@ if (LOG != NULL) p += 2; while (isspace(*p)) p++; q = p; - while (*p != 0 && !isspace(*p)) + while (*p && !isspace(*p)) { if (*p++ != '\"') continue; - while (*p != 0) - { + while (*p) if (*p == '\\') p += 2; - else if (*p++ == '\"') break; - } + else if (*p++ == '\"') break; } *p++ = 0; if ((r = strstric(q, qualify_domain, FALSE)) != NULL &&