Copyright updates:
[exim.git] / src / src / string.c
index 4d870ec9ac1a96f37776e5ba9e197122483a9c9a..a5161bb31e057d3592294a7a9bd0ad57e4b101f4 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. */
 
 /* Miscellaneous string-handling functions. Some are not required for
@@ -1166,6 +1166,13 @@ if (!g)
   unsigned size = ((count + inc) &  ~inc) + 1; /* round up requested count */
   g = string_get_tainted(size, s);
   }
+else if (!g->s)                        /* should not happen */
+  {
+  g->s = string_copyn(s, count);
+  g->ptr = count;
+  g->size = count;     /*XXX suboptimal*/
+  return g;
+  }
 else if (is_incompatible(g->s, s))
   {
 /* debug_printf("rebuf A\n"); */