diff options
author | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-11-05 07:49:04 +0000 |
---|---|---|
committer | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-11-05 07:49:04 +0000 |
commit | 9f5f109c8466d04bf4c028ddaf178e48192bd67b (patch) | |
tree | 0e71b24cbaaecbe11df6c7b38f4a40456ec7d6d9 /usr.sbin/ldapd | |
parent | 5e2b3e21e5ef93c933ea7d26688633b03c36be82 (diff) |
When draining the input buffer of more than two complete requests, an
additional incomplete request would be truncated. This fixes the number of
bytes consumed from the input buffer.
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r-- | usr.sbin/ldapd/conn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/conn.c b/usr.sbin/ldapd/conn.c index 7c7e137e720..e9a69300e25 100644 --- a/usr.sbin/ldapd/conn.c +++ b/usr.sbin/ldapd/conn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conn.c,v 1.6 2010/10/19 09:10:12 martinh Exp $ */ +/* $OpenBSD: conn.c,v 1.7 2010/11/05 07:49:03 martinh Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se> @@ -180,7 +180,7 @@ conn_read(struct bufferevent *bev, void *data) while (conn->ber.br_rend - conn->ber.br_rptr > 0) { if (conn_dispatch(conn) == 0) - nused += conn->ber.br_rptr - conn->ber.br_rbuf; + nused = conn->ber.br_rptr - conn->ber.br_rbuf; else break; } |