Extra checks on inbound SMTP stream buffer refill
[users/heiko/exim.git] / src / src / lookups / ldap.c
index 235af0f937a42a43cfbae145ef9c6c55bda00a9e..0c2c87fc3e0d73535b9a32504dde5073a87eb776 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2017 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Many thanks to Stuart Lynne for contributing the original code for this
@@ -889,7 +889,7 @@ while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
 if (data)
   {
   (void) string_from_gstring(data);
-  store_reset(data->s + data->ptr + 1);
+  gstring_reset_unused(data);
   }
 
 /* Copy the last dn into eldap_dn */