]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sock/result.c
ITS#6024 Don't send cookies without csn.
[openldap] / servers / slapd / back-sock / result.c
index df380f20a71eb51400c4cc800f2552b73afe3916..c1fcc591c61c3c25c4a6f7512f2a5f85b10e9e51 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2007 The OpenLDAP Foundation.
+ * Copyright 2007-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * top-level directory of the distribution or, alternatively, at
  * <http://www.OpenLDAP.org/license.html>.
  */
+/* ACKNOWLEDGEMENTS:
+ * This work was initially developed by Brian Candler for inclusion
+ * in OpenLDAP Software.
+ */
 
 #include "portable.h"
 
@@ -73,7 +77,7 @@ sock_read_and_send_results(
                }
 
                len = strlen( line );
-               while ( bp + len - buf > bsize ) {
+               while ( bp + len + 1 - buf > bsize ) {
                        size_t offset = bp - buf;
                        bsize += BUFSIZ;
                        buf = (char *) ch_realloc( buf, bsize );