Copyright updates:
[exim.git] / src / src / functions.h
index f0c0a3aad99418fd79bbe9b5932785801e8538db..f8e0cd77e3be5c3f0e087832b4d32a47dc8b6e09 100644 (file)
@@ -2,8 +2,8 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
+/* Copyright (c) The Exim Maintainers 2020 - 2022 */
 /* Copyright (c) University of Cambridge 1995 - 2018 */
-/* Copyright (c) The Exim Maintainers 2020 - 2021 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -1264,10 +1264,10 @@ HDEBUG(D_transport|D_acl|D_v) debug_printf_indent("  SMTP%c> %s\n",
 
 #  ifndef DISABLE_CLIENT_CMD_LOG
   {
+  int len = Ustrcspn(buf, " \n");
   int old_pool = store_pool;
   store_pool = POOL_PERM;      /* Main pool ACL allocations eg. callouts get released */
-  client_cmd_log = string_append_listele_n(client_cmd_log, ':', buf,
-                                         Ustrcspn(buf, " \n"));
+  client_cmd_log = string_append_listele_n(client_cmd_log, ':', buf, MIN(len, 8));
   if (mode == SCMD_BUFFER) 
     {
     client_cmd_log = string_catn(client_cmd_log, US"|", 1);