SPDX: license tags (mostly by guesswork)
[exim.git] / src / src / lookups / lsearch.c
index 4da422e9eb51e1e17f945a45d2638a4108029855..da73ae8bf57064f356ae1b1c4ee4cf607c9d6241 100644 (file)
@@ -2,9 +2,10 @@
 *     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 */
 /* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-only */
 
 #include "../exim.h"
 #include "lf_functions.h"
@@ -154,7 +155,7 @@ for (BOOL this_is_eol, last_was_eol = TRUE;
     linekeylength = t - buffer;
     if (*s) s++;                       /* Past terminating " */
     if (ret_full)
-      Ustrcpy(t, s);                   /* copy the rest of line does also */
+      memmove(t, s, Ustrlen(s)+1);     /* copy the rest of line also */
     }
 
   /* Otherwise it is terminated by a colon or white space */
@@ -416,12 +417,13 @@ lsearch_close(void *handle)
 
 #include "../version.h"
 
-void
-lsearch_version_report(FILE *f)
+gstring *
+lsearch_version_report(gstring * g)
 {
 #ifdef DYNLOOKUP
-fprintf(f, "Library version: lsearch: Exim version %s\n", EXIM_VERSION_STR);
+g = string_fmt_append(g, "Library version: lsearch: Exim version %s\n", EXIM_VERSION_STR));
 #endif
+return g;
 }