Debug: build a summary string tracking transport SMTP commands & responses
[exim.git] / src / src / string.c
index 4d870ec9ac1a96f37776e5ba9e197122483a9c9a..c23055d4750567c27763f840eb6ccca6373f993c 100644 (file)
@@ -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"); */