]> 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 f6fcad35cebfe9f48cd24a93fd3788ab3f429edf..c1fcc591c61c3c25c4a6f7512f2a5f85b10e9e51 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2007-2008 The OpenLDAP Foundation.
+ * Copyright 2007-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -77,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 );